summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2013-06-19 16:58:58 -0700
committerChris Craik <ccraik@google.com>2013-06-19 16:58:58 -0700
commitc5493fb7fa1f6995955c667d4377f2337f2cf465 (patch)
tree8ccfc0798c68abf6fa5107452d57879967bcffd3 /libs/hwui
parentcadc5bf4116945a1800061f984d95175e20caba6 (diff)
downloadframeworks_base-c5493fb7fa1f6995955c667d4377f2337f2cf465.zip
frameworks_base-c5493fb7fa1f6995955c667d4377f2337f2cf465.tar.gz
frameworks_base-c5493fb7fa1f6995955c667d4377f2337f2cf465.tar.bz2
Make op outputting const, for more general logging
Change-Id: Iaf78985ee5558e0b5d32d7bc1cd039eaffc820e5
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/DisplayListOp.h86
1 files changed, 43 insertions, 43 deletions
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index f678bfd..ad72e1a 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -77,7 +77,7 @@ public:
virtual void replay(ReplayStateStruct& replayStruct, int saveCount, int level,
bool useQuickReject) = 0;
- virtual void output(int level, uint32_t logFlags = 0) = 0;
+ virtual void output(int level, uint32_t logFlags = 0) const = 0;
// NOTE: it would be nice to declare constants and overriding the implementation in each op to
// point at the constants, but that seems to require a .cpp file
@@ -278,7 +278,7 @@ public:
renderer.save(mFlags);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Save flags %x", mFlags);
}
@@ -312,7 +312,7 @@ public:
renderer.restoreToCount(saveCount + mCount);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Restore to count %d", mCount);
}
@@ -351,7 +351,7 @@ public:
renderer.saveLayer(mArea.left, mArea.top, mArea.right, mArea.bottom, mAlpha, mMode, mFlags);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("SaveLayer%s of area " RECT_STRING,
(isSaveLayerAlpha() ? "Alpha" : ""),RECT_ARGS(mArea));
}
@@ -372,7 +372,7 @@ private:
return this;
}
- bool isSaveLayerAlpha() { return mAlpha < 255 && mMode == SkXfermode::kSrcOver_Mode; }
+ bool isSaveLayerAlpha() const { return mAlpha < 255 && mMode == SkXfermode::kSrcOver_Mode; }
Rect mArea;
int mAlpha;
SkXfermode::Mode mMode;
@@ -388,7 +388,7 @@ public:
renderer.translate(mDx, mDy);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Translate by %f %f", mDx, mDy);
}
@@ -408,7 +408,7 @@ public:
renderer.rotate(mDegrees);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Rotate by %f degrees", mDegrees);
}
@@ -427,7 +427,7 @@ public:
renderer.scale(mSx, mSy);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Scale by %f %f", mSx, mSy);
}
@@ -447,7 +447,7 @@ public:
renderer.skew(mSx, mSy);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Skew by %f %f", mSx, mSy);
}
@@ -467,7 +467,7 @@ public:
renderer.setMatrix(mMatrix);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("SetMatrix " MATRIX_STRING, MATRIX_ARGS(mMatrix));
}
@@ -486,7 +486,7 @@ public:
renderer.concatMatrix(mMatrix);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("ConcatMatrix " MATRIX_STRING, MATRIX_ARGS(mMatrix));
}
@@ -530,7 +530,7 @@ public:
renderer.clipRect(mArea.left, mArea.top, mArea.right, mArea.bottom, mOp);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("ClipRect " RECT_STRING, RECT_ARGS(mArea));
}
@@ -559,7 +559,7 @@ public:
renderer.clipPath(mPath, mOp);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
SkRect bounds = mPath->getBounds();
OP_LOG("ClipPath bounds " RECT_STRING,
bounds.left(), bounds.top(), bounds.right(), bounds.bottom());
@@ -580,7 +580,7 @@ public:
renderer.clipRegion(mRegion, mOp);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
SkIRect bounds = mRegion->getBounds();
OP_LOG("ClipRegion bounds %d %d %d %d",
bounds.left(), bounds.top(), bounds.right(), bounds.bottom());
@@ -599,7 +599,7 @@ public:
renderer.resetShader();
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOGS("ResetShader");
}
@@ -614,7 +614,7 @@ public:
renderer.setupShader(mShader);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("SetupShader, shader %p", mShader);
}
@@ -630,7 +630,7 @@ public:
renderer.resetColorFilter();
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOGS("ResetColorFilter");
}
@@ -646,7 +646,7 @@ public:
renderer.setupColorFilter(mColorFilter);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("SetupColorFilter, filter %p", mColorFilter);
}
@@ -662,7 +662,7 @@ public:
renderer.resetShadow();
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOGS("ResetShadow");
}
@@ -678,7 +678,7 @@ public:
renderer.setupShadow(mRadius, mDx, mDy, mColor);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("SetupShadow, radius %f, %f, %f, color %#x", mRadius, mDx, mDy, mColor);
}
@@ -697,7 +697,7 @@ public:
renderer.resetPaintFilter();
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOGS("ResetPaintFilter");
}
@@ -713,7 +713,7 @@ public:
renderer.setupPaintFilter(mClearBits, mSetBits);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("SetupPaintFilter, clear %#x, set %#x", mClearBits, mSetBits);
}
@@ -784,7 +784,7 @@ public:
transformed, bounds, mPaint);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw bitmap %p at %f %f", mBitmap, mLocalBounds.left, mLocalBounds.top);
}
@@ -822,7 +822,7 @@ public:
return renderer.drawBitmap(mBitmap, mMatrix, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw bitmap %p matrix " MATRIX_STRING, mBitmap, MATRIX_ARGS(mMatrix));
}
@@ -850,7 +850,7 @@ public:
getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw bitmap %p src="RECT_STRING", dst="RECT_STRING,
mBitmap, RECT_ARGS(mSrc), RECT_ARGS(mLocalBounds));
}
@@ -876,7 +876,7 @@ public:
mLocalBounds.top, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw bitmap %p", mBitmap);
}
@@ -900,7 +900,7 @@ public:
mVertices, mColors, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw bitmap %p mesh %d x %d", mBitmap, mMeshWidth, mMeshHeight);
}
@@ -942,7 +942,7 @@ public:
mLocalBounds.right, mLocalBounds.bottom, mAlpha, mMode);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw patch "RECT_STRING, RECT_ARGS(mLocalBounds));
}
@@ -976,7 +976,7 @@ public:
return renderer.drawColor(mColor, mMode);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw color %#x, mode %d", mColor, mMode);
}
@@ -1021,7 +1021,7 @@ public:
mLocalBounds.right, mLocalBounds.bottom, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Rect "RECT_STRING, RECT_ARGS(mLocalBounds));
}
@@ -1044,7 +1044,7 @@ public:
return renderer.drawRects(mRects, mCount, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Rects count %d", mCount);
}
@@ -1070,7 +1070,7 @@ public:
mLocalBounds.right, mLocalBounds.bottom, mRx, mRy, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw RoundRect "RECT_STRING", rx %f, ry %f", RECT_ARGS(mLocalBounds), mRx, mRy);
}
@@ -1091,7 +1091,7 @@ public:
return renderer.drawCircle(mX, mY, mRadius, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Circle x %f, y %f, r %f", mX, mY, mRadius);
}
@@ -1113,7 +1113,7 @@ public:
mLocalBounds.right, mLocalBounds.bottom, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Oval "RECT_STRING, RECT_ARGS(mLocalBounds));
}
@@ -1133,7 +1133,7 @@ public:
mStartAngle, mSweepAngle, mUseCenter, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Arc "RECT_STRING", start %f, sweep %f, useCenter %d",
RECT_ARGS(mLocalBounds), mStartAngle, mSweepAngle, mUseCenter);
}
@@ -1169,7 +1169,7 @@ public:
deferInfo.batchId = DeferredDisplayList::kOpBatch_AlphaMaskTexture;
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Path %p in "RECT_STRING, mPath, RECT_ARGS(mLocalBounds));
}
@@ -1191,7 +1191,7 @@ public:
return renderer.drawLines(mPoints, mCount, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Lines count %d", mCount);
}
@@ -1217,7 +1217,7 @@ public:
return renderer.drawPoints(mPoints, mCount, getPaint(renderer));
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Points count %d", mCount);
}
@@ -1229,7 +1229,7 @@ public:
DrawSomeTextOp(const char* text, int bytesCount, int count, SkPaint* paint)
: DrawOp(paint), mText(text), mBytesCount(bytesCount), mCount(count) {};
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw some text, %d bytes", mBytesCount);
}
@@ -1339,7 +1339,7 @@ public:
return status;
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Text of count %d, bytes %d", mCount, mBytesCount);
}
@@ -1372,7 +1372,7 @@ public:
return ret;
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Functor %p", mFunctor);
}
@@ -1406,7 +1406,7 @@ public:
return DrawGlInfo::kStatusDone;
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Display List %p, flags %#x", mDisplayList, mFlags);
if (mDisplayList && (logFlags & kOpLogFlag_Recurse)) {
mDisplayList->output(level + 1);
@@ -1429,7 +1429,7 @@ public:
return renderer.drawLayer(mLayer, mX, mY);
}
- virtual void output(int level, uint32_t logFlags) {
+ virtual void output(int level, uint32_t logFlags) const {
OP_LOG("Draw Layer %p at %f %f", mLayer, mX, mY);
}