diff options
author | Andreas Gampe <agampe@google.com> | 2014-11-22 00:35:09 +0000 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-11-22 00:35:09 +0000 |
commit | 64bb413a664001c95c8439cf097dc3033f4ed733 (patch) | |
tree | d4562f7bb5656865d32e5d684b5a41542ecfaf58 /libs/hwui/DisplayListOp.h | |
parent | 8a902d9f24e83c87b054adb5836b4a5b8a257be9 (diff) | |
download | frameworks_base-64bb413a664001c95c8439cf097dc3033f4ed733.zip frameworks_base-64bb413a664001c95c8439cf097dc3033f4ed733.tar.gz frameworks_base-64bb413a664001c95c8439cf097dc3033f4ed733.tar.bz2 |
Revert "resolved conflicts for merge of 220c3f4f to master"
Reverted as hwui doesn't agree.
This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9.
Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
Diffstat (limited to 'libs/hwui/DisplayListOp.h')
-rw-r--r-- | libs/hwui/DisplayListOp.h | 226 |
1 files changed, 113 insertions, 113 deletions
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h index 86721e9..7627163 100644 --- a/libs/hwui/DisplayListOp.h +++ b/libs/hwui/DisplayListOp.h @@ -66,7 +66,7 @@ public: // These objects should always be allocated with a LinearAllocator, and never destroyed/deleted. // standard new() intentionally not implemented, and delete/deconstructor should never be used. virtual ~DisplayListOp() { CRASH(); } - static void operator delete(void* /* ptr */) { CRASH(); } + static void operator delete(void* ptr) { CRASH(); } /** static void* operator new(size_t size); PURPOSELY OMITTED **/ static void* operator new(size_t size, LinearAllocator& allocator) { return allocator.alloc(size); @@ -96,8 +96,8 @@ public: virtual ~StateOp() {} - virtual void defer(DeferStateStruct& deferStruct, int saveCount, int /* level */, - bool /* useQuickReject */) { + virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level, + bool useQuickReject) { // default behavior only affects immediate, deferrable state, issue directly to renderer applyState(deferStruct.mRenderer, saveCount); } @@ -106,8 +106,8 @@ public: * State operations are applied directly to the renderer, but can cause the deferred drawing op * list to flush */ - virtual void replay(ReplayStateStruct& replayStruct, int saveCount, int /* level */, - bool /* useQuickReject */) { + virtual void replay(ReplayStateStruct& replayStruct, int saveCount, int level, + bool useQuickReject) { applyState(replayStruct.mRenderer, saveCount); } @@ -120,7 +120,7 @@ public: DrawOp(const SkPaint* paint) : mPaint(paint), mQuickRejected(false) {} - virtual void defer(DeferStateStruct& deferStruct, int /* saveCount */, int /* level */, + virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level, bool useQuickReject) { if (mQuickRejected && CC_LIKELY(useQuickReject)) { return; @@ -129,7 +129,7 @@ public: deferStruct.mDeferredList.addDrawOp(deferStruct.mRenderer, this); } - virtual void replay(ReplayStateStruct& replayStruct, int /* saveCount */, int /* level */, + virtual void replay(ReplayStateStruct& replayStruct, int saveCount, int level, bool useQuickReject) { if (mQuickRejected && CC_LIKELY(useQuickReject)) { return; @@ -148,7 +148,7 @@ public: * reducing which operations are tagged as mergeable. */ virtual void multiDraw(OpenGLRenderer& renderer, Rect& dirty, - const Vector<OpStatePair>& ops, const Rect& /* bounds */) { + const Vector<OpStatePair>& ops, const Rect& bounds) { for (unsigned int i = 0; i < ops.size(); i++) { renderer.restoreDisplayState(*(ops[i].state), true); ops[i].op->applyDraw(renderer, dirty); @@ -165,15 +165,15 @@ public: * * if a subclass can set deferInfo.mergeable to true, it should implement multiDraw() */ - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& /* deferInfo */, - const DeferredDisplayState& /* state */) {} + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, + const DeferredDisplayState& state) {} /** * Query the conservative, local bounds (unmapped) bounds of the op. * * returns true if bounds exist */ - virtual bool getLocalBounds(Rect& /* localBounds */) { + virtual bool getLocalBounds(Rect& localBounds) { return false; } @@ -282,17 +282,17 @@ public: SaveOp(int flags) : mFlags(flags) {} - virtual void defer(DeferStateStruct& deferStruct, int /* saveCount */, int /* level */, - bool /* useQuickReject */) { + virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level, + bool useQuickReject) { int newSaveCount = deferStruct.mRenderer.save(mFlags); deferStruct.mDeferredList.addSave(deferStruct.mRenderer, this, newSaveCount); } - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.save(mFlags); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Save flags %x", mFlags); } @@ -308,8 +308,8 @@ public: RestoreToCountOp(int count) : mCount(count) {} - virtual void defer(DeferStateStruct& deferStruct, int saveCount, int /* level */, - bool /* useQuickReject */) { + virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level, + bool useQuickReject) { deferStruct.mDeferredList.addRestoreToCount(deferStruct.mRenderer, this, saveCount + mCount); deferStruct.mRenderer.restoreToCount(saveCount + mCount); @@ -319,7 +319,7 @@ public: renderer.restoreToCount(saveCount + mCount); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Restore to count %d", mCount); } @@ -346,8 +346,8 @@ public: , mConvexMask(NULL) {} - virtual void defer(DeferStateStruct& deferStruct, int /* saveCount */, int /* level */, - bool /* useQuickReject */) { + virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level, + bool useQuickReject) { // NOTE: don't bother with actual saveLayer, instead issuing it at flush time int newSaveCount = deferStruct.mRenderer.getSaveCount(); deferStruct.mDeferredList.addSaveLayer(deferStruct.mRenderer, this, newSaveCount); @@ -358,12 +358,12 @@ public: mPaint, mFlags); } - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.saveLayer(mArea.left, mArea.top, mArea.right, mArea.bottom, mPaint, mFlags, mConvexMask); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("SaveLayer%s of area " RECT_STRING, (isSaveLayerAlpha() ? "Alpha" : ""),RECT_ARGS(mArea)); } @@ -399,11 +399,11 @@ public: TranslateOp(float dx, float dy) : mDx(dx), mDy(dy) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.translate(mDx, mDy); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Translate by %f %f", mDx, mDy); } @@ -419,11 +419,11 @@ public: RotateOp(float degrees) : mDegrees(degrees) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.rotate(mDegrees); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Rotate by %f degrees", mDegrees); } @@ -438,11 +438,11 @@ public: ScaleOp(float sx, float sy) : mSx(sx), mSy(sy) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.scale(mSx, mSy); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Scale by %f %f", mSx, mSy); } @@ -458,11 +458,11 @@ public: SkewOp(float sx, float sy) : mSx(sx), mSy(sy) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.skew(mSx, mSy); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Skew by %f %f", mSx, mSy); } @@ -478,11 +478,11 @@ public: SetMatrixOp(const SkMatrix& matrix) : mMatrix(matrix) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.setMatrix(mMatrix); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { if (mMatrix.isIdentity()) { OP_LOGS("SetMatrix (reset)"); } else { @@ -501,11 +501,11 @@ public: ConcatMatrixOp(const SkMatrix& matrix) : mMatrix(matrix) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.concatMatrix(mMatrix); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("ConcatMatrix " SK_MATRIX_STRING, SK_MATRIX_ARGS(&mMatrix)); } @@ -519,8 +519,8 @@ class ClipOp : public StateOp { public: ClipOp(SkRegion::Op op) : mOp(op) {} - virtual void defer(DeferStateStruct& deferStruct, int saveCount, int /* level */, - bool /* useQuickReject */) { + virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level, + bool useQuickReject) { // NOTE: must defer op BEFORE applying state, since it may read clip deferStruct.mDeferredList.addClip(deferStruct.mRenderer, this); @@ -543,11 +543,11 @@ public: ClipRectOp(float left, float top, float right, float bottom, SkRegion::Op op) : ClipOp(op), mArea(left, top, right, bottom) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.clipRect(mArea.left, mArea.top, mArea.right, mArea.bottom, mOp); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("ClipRect " RECT_STRING, RECT_ARGS(mArea)); } @@ -565,11 +565,11 @@ public: ClipPathOp(const SkPath* path, SkRegion::Op op) : ClipOp(op), mPath(path) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.clipPath(mPath, mOp); } - virtual void output(int level, uint32_t /* logFlags */) const { + 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()); @@ -586,11 +586,11 @@ public: ClipRegionOp(const SkRegion* region, SkRegion::Op op) : ClipOp(op), mRegion(region) {} - virtual void applyState(OpenGLRenderer& renderer, int /* saveCount */) const { + virtual void applyState(OpenGLRenderer& renderer, int saveCount) const { renderer.clipRegion(mRegion, mOp); } - virtual void output(int level, uint32_t /* logFlags */) const { + 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()); @@ -619,7 +619,7 @@ public: } } - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawBitmap(mBitmap, mPaint); } @@ -642,7 +642,7 @@ public: * for each bitmap in the batch. This method is also responsible for dirtying * the current layer, if any. */ - virtual void multiDraw(OpenGLRenderer& renderer, Rect& /* dirty */, + virtual void multiDraw(OpenGLRenderer& renderer, Rect& dirty, const Vector<OpStatePair>& ops, const Rect& bounds) { const DeferredDisplayState& firstState = *(ops[0].state); renderer.restoreDisplayState(firstState, true); // restore all but the clip @@ -683,13 +683,13 @@ public: pureTranslate, bounds, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw bitmap %p at %f %f", mBitmap, mLocalBounds.left, mLocalBounds.top); } virtual const char* name() { return "DrawBitmap"; } - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& deferInfo, + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, const DeferredDisplayState& state) { deferInfo.batchId = DeferredDisplayList::kOpBatch_Bitmap; deferInfo.mergeId = getAtlasEntry() ? @@ -722,21 +722,21 @@ public: : DrawBoundedOp(dstLeft, dstTop, dstRight, dstBottom, paint), mBitmap(bitmap), mSrc(srcLeft, srcTop, srcRight, srcBottom) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawBitmap(mBitmap, mSrc.left, mSrc.top, mSrc.right, mSrc.bottom, mLocalBounds.left, mLocalBounds.top, mLocalBounds.right, mLocalBounds.bottom, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + 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)); } virtual const char* name() { return "DrawBitmapRect"; } - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& deferInfo, - const DeferredDisplayState& /* state */) { + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, + const DeferredDisplayState& state) { deferInfo.batchId = DeferredDisplayList::kOpBatch_Bitmap; } @@ -750,18 +750,18 @@ public: DrawBitmapDataOp(const SkBitmap* bitmap, const SkPaint* paint) : DrawBitmapOp(bitmap, paint) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawBitmapData(mBitmap, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw bitmap %p", mBitmap); } virtual const char* name() { return "DrawBitmapData"; } - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& deferInfo, - const DeferredDisplayState& /* state */) { + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, + const DeferredDisplayState& state) { deferInfo.batchId = DeferredDisplayList::kOpBatch_Bitmap; } }; @@ -774,19 +774,19 @@ public: mBitmap(bitmap), mMeshWidth(meshWidth), mMeshHeight(meshHeight), mVertices(vertices), mColors(colors) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawBitmapMesh(mBitmap, mMeshWidth, mMeshHeight, mVertices, mColors, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw bitmap %p mesh %d x %d", mBitmap, mMeshWidth, mMeshHeight); } virtual const char* name() { return "DrawBitmapMesh"; } - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& deferInfo, - const DeferredDisplayState& /* state */) { + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, + const DeferredDisplayState& state) { deferInfo.batchId = DeferredDisplayList::kOpBatch_Bitmap; } @@ -835,8 +835,8 @@ public: * and transforming the vertices of each 9-patch in the batch. This method * is also responsible for dirtying the current layer, if any. */ - virtual void multiDraw(OpenGLRenderer& renderer, Rect& /* dirty */, - const Vector<OpStatePair>& ops, const Rect& /* bounds */) { + virtual void multiDraw(OpenGLRenderer& renderer, Rect& dirty, + const Vector<OpStatePair>& ops, const Rect& bounds) { const DeferredDisplayState& firstState = *(ops[0].state); renderer.restoreDisplayState(firstState, true); // restore all but the clip @@ -909,7 +909,7 @@ public: &vertices[0], indexCount, mPaint); } - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { // We're not calling the public variant of drawPatch() here // This method won't perform the quickReject() since we've already done it at this point renderer.drawPatch(mBitmap, getMesh(renderer), getAtlasEntry(), @@ -917,13 +917,13 @@ public: mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw patch " RECT_STRING, RECT_ARGS(mLocalBounds)); } virtual const char* name() { return "DrawPatch"; } - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& deferInfo, + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, const DeferredDisplayState& state) { deferInfo.batchId = DeferredDisplayList::kOpBatch_Patch; deferInfo.mergeId = getAtlasEntry() ? (mergeid_t) mEntry->getMergeId() : (mergeid_t) mBitmap; @@ -949,11 +949,11 @@ public: DrawColorOp(int color, SkXfermode::Mode mode) : DrawOp(NULL), mColor(color), mMode(mode) {}; - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawColor(mColor, mMode); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw color %#x, mode %d", mColor, mMode); } @@ -979,8 +979,8 @@ public: return true; } - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& deferInfo, - const DeferredDisplayState& /* state */) { + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, + const DeferredDisplayState& state) { if (mPaint->getPathEffect()) { deferInfo.batchId = DeferredDisplayList::kOpBatch_AlphaMaskTexture; } else { @@ -996,12 +996,12 @@ public: DrawRectOp(float left, float top, float right, float bottom, const SkPaint* paint) : DrawStrokableOp(left, top, right, bottom, paint) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawRect(mLocalBounds.left, mLocalBounds.top, mLocalBounds.right, mLocalBounds.bottom, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Rect " RECT_STRING, RECT_ARGS(mLocalBounds)); } @@ -1021,18 +1021,18 @@ public: : DrawBoundedOp(rects, count, paint), mRects(rects), mCount(count) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawRects(mRects, mCount, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Rects count %d", mCount); } virtual const char* name() { return "DrawRects"; } - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& deferInfo, - const DeferredDisplayState& /* state */) { + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, + const DeferredDisplayState& state) { deferInfo.batchId = DeferredDisplayList::kOpBatch_Vertices; } @@ -1047,12 +1047,12 @@ public: float rx, float ry, const SkPaint* paint) : DrawStrokableOp(left, top, right, bottom, paint), mRx(rx), mRy(ry) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawRoundRect(mLocalBounds.left, mLocalBounds.top, mLocalBounds.right, mLocalBounds.bottom, mRx, mRy, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw RoundRect " RECT_STRING ", rx %f, ry %f", RECT_ARGS(mLocalBounds), mRx, mRy); } @@ -1079,12 +1079,12 @@ public: : DrawOp(paint), mLeft(left), mTop(top), mRight(right), mBottom(bottom), mRx(rx), mRy(ry) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawRoundRect(*mLeft, *mTop, *mRight, *mBottom, *mRx, *mRy, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw RoundRect Props " RECT_STRING ", rx %f, ry %f", *mLeft, *mTop, *mRight, *mBottom, *mRx, *mRy); } @@ -1106,11 +1106,11 @@ public: : DrawStrokableOp(x - radius, y - radius, x + radius, y + radius, paint), mX(x), mY(y), mRadius(radius) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawCircle(mX, mY, mRadius, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Circle x %f, y %f, r %f", mX, mY, mRadius); } @@ -1127,11 +1127,11 @@ public: DrawCirclePropsOp(float* x, float* y, float* radius, const SkPaint* paint) : DrawOp(paint), mX(x), mY(y), mRadius(radius) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawCircle(*mX, *mY, *mRadius, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Circle Props x %p, y %p, r %p", mX, mY, mRadius); } @@ -1148,12 +1148,12 @@ public: DrawOvalOp(float left, float top, float right, float bottom, const SkPaint* paint) : DrawStrokableOp(left, top, right, bottom, paint) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawOval(mLocalBounds.left, mLocalBounds.top, mLocalBounds.right, mLocalBounds.bottom, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Oval " RECT_STRING, RECT_ARGS(mLocalBounds)); } @@ -1167,13 +1167,13 @@ public: : DrawStrokableOp(left, top, right, bottom, paint), mStartAngle(startAngle), mSweepAngle(sweepAngle), mUseCenter(useCenter) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawArc(mLocalBounds.left, mLocalBounds.top, mLocalBounds.right, mLocalBounds.bottom, mStartAngle, mSweepAngle, mUseCenter, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + 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); } @@ -1198,18 +1198,18 @@ public: mLocalBounds.set(left, top, left + width, top + height); } - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawPath(mPath, mPaint); } virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, - const DeferredDisplayState& /* state */) { + const DeferredDisplayState& state) { renderer.getCaches().pathCache.precache(mPath, mPaint); deferInfo.batchId = DeferredDisplayList::kOpBatch_AlphaMaskTexture; } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Path %p in " RECT_STRING, mPath, RECT_ARGS(mLocalBounds)); } @@ -1227,18 +1227,18 @@ public: mLocalBounds.outset(strokeWidthOutset()); } - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawLines(mPoints, mCount, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Lines count %d", mCount); } virtual const char* name() { return "DrawLines"; } - virtual void onDefer(OpenGLRenderer& /* renderer */, DeferInfo& deferInfo, - const DeferredDisplayState& /* state */) { + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, + const DeferredDisplayState& state) { deferInfo.batchId = mPaint->isAntiAlias() ? DeferredDisplayList::kOpBatch_AlphaVertices : DeferredDisplayList::kOpBatch_Vertices; @@ -1254,11 +1254,11 @@ public: DrawPointsOp(const float* points, int count, const SkPaint* paint) : DrawLinesOp(points, count, paint) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawPoints(mPoints, mCount, mPaint); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Points count %d", mCount); } @@ -1270,7 +1270,7 @@ public: DrawSomeTextOp(const char* text, int bytesCount, int count, const SkPaint* paint) : DrawOp(paint), mText(text), mBytesCount(bytesCount), mCount(count) {}; - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw some text, %d bytes", mBytesCount); } @@ -1279,7 +1279,7 @@ public: } virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, - const DeferredDisplayState& /* state */) { + const DeferredDisplayState& state) { FontRenderer& fontRenderer = renderer.getCaches().fontRenderer->getFontRenderer(mPaint); fontRenderer.precache(mPaint, mText, mCount, SkMatrix::I()); @@ -1303,7 +1303,7 @@ public: /* TODO: inherit from DrawBounded and init mLocalBounds */ } - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawTextOnPath(mText, mBytesCount, mCount, mPath, mHOffset, mVOffset, mPaint); } @@ -1324,7 +1324,7 @@ public: /* TODO: inherit from DrawBounded and init mLocalBounds */ } - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawPosText(mText, mBytesCount, mCount, mPositions, mPaint); } @@ -1367,15 +1367,15 @@ public: && OpenGLRenderer::getXfermodeDirect(mPaint) == SkXfermode::kSrcOver_Mode; } - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { Rect bounds; getLocalBounds(bounds); renderer.drawText(mText, mBytesCount, mCount, mX, mY, mPositions, mPaint, mTotalAdvance, bounds); } - virtual void multiDraw(OpenGLRenderer& renderer, Rect& /* dirty */, - const Vector<OpStatePair>& ops, const Rect& /* bounds */) { + virtual void multiDraw(OpenGLRenderer& renderer, Rect& dirty, + const Vector<OpStatePair>& ops, const Rect& bounds) { for (unsigned int i = 0; i < ops.size(); i++) { const DeferredDisplayState& state = *(ops[i].state); DrawOpMode drawOpMode = (i == ops.size() - 1) ? kDrawOpMode_Flush : kDrawOpMode_Defer; @@ -1390,7 +1390,7 @@ public: } } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Text of count %d, bytes %d", mCount, mBytesCount); } @@ -1422,7 +1422,7 @@ public: renderer.endMark(); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Functor %p", mFunctor); } @@ -1440,21 +1440,21 @@ public: : DrawBoundedOp(0, 0, renderNode->getWidth(), renderNode->getHeight(), 0), mRenderNode(renderNode), mFlags(flags), mTransformFromParent(transformFromParent) {} - virtual void defer(DeferStateStruct& deferStruct, int /* saveCount */, int level, - bool /* useQuickReject */) { + virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level, + bool useQuickReject) { if (mRenderNode->isRenderable() && !mSkipInOrderDraw) { mRenderNode->defer(deferStruct, level + 1); } } - virtual void replay(ReplayStateStruct& replayStruct, int /* saveCount */, int level, - bool /* useQuickReject */) { + virtual void replay(ReplayStateStruct& replayStruct, int saveCount, int level, + bool useQuickReject) { if (mRenderNode->isRenderable() && !mSkipInOrderDraw) { mRenderNode->replay(replayStruct, level + 1); } } - virtual void applyDraw(OpenGLRenderer& /* renderer */, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { LOG_ALWAYS_FATAL("should not be called, because replay() is overridden"); } @@ -1507,14 +1507,14 @@ public: , mCasterOutline(casterOutline) { } - virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& /* deferInfo */, + virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo, const DeferredDisplayState& state) { renderer.getCaches().tessellationCache.precacheShadows(&state.mMatrix, renderer.getLocalClipBounds(), isCasterOpaque(), mCasterOutline, &mTransformXY, &mTransformZ, renderer.getLightCenter(), renderer.getLightRadius()); } - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { TessellationCache::vertexBuffer_pair_t buffers; Matrix4 drawTransform(*(renderer.currentTransform())); renderer.getCaches().tessellationCache.getShadowBuffers(&drawTransform, @@ -1525,7 +1525,7 @@ public: renderer.drawShadow(mCasterAlpha, buffers.first, buffers.second); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOGS("DrawShadow"); } @@ -1545,11 +1545,11 @@ public: DrawLayerOp(Layer* layer, float x, float y) : DrawOp(NULL), mLayer(layer), mX(x), mY(y) {} - virtual void applyDraw(OpenGLRenderer& renderer, Rect& /* dirty */) { + virtual void applyDraw(OpenGLRenderer& renderer, Rect& dirty) { renderer.drawLayer(mLayer, mX, mY); } - virtual void output(int level, uint32_t /* logFlags */) const { + virtual void output(int level, uint32_t logFlags) const { OP_LOG("Draw Layer %p at %f %f", mLayer, mX, mY); } |