diff options
author | Andreas Gampe <agampe@google.com> | 2014-11-21 15:51:04 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-11-21 15:51:04 -0800 |
commit | 8a902d9f24e83c87b054adb5836b4a5b8a257be9 (patch) | |
tree | 7a1842dd8f8b9b8e1880df7a3fe0fc7f5d103d48 /libs | |
parent | fa6547f6c0aad15c308a4ba946955087081ae1eb (diff) | |
parent | 220c3f4f48b53b6010093a1ef437f4197a382ebf (diff) | |
download | frameworks_base-8a902d9f24e83c87b054adb5836b4a5b8a257be9.zip frameworks_base-8a902d9f24e83c87b054adb5836b4a5b8a257be9.tar.gz frameworks_base-8a902d9f24e83c87b054adb5836b4a5b8a257be9.tar.bz2 |
resolved conflicts for merge of 220c3f4f to master
Change-Id: I37ecce8fddecdff82b0eace16f1ee75152f7171e
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/Android.mk | 2 | ||||
-rw-r--r-- | libs/hwui/AnimationContext.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/Animator.cpp | 8 | ||||
-rw-r--r-- | libs/hwui/Caches.h | 10 | ||||
-rw-r--r-- | libs/hwui/DeferredDisplayList.cpp | 14 | ||||
-rw-r--r-- | libs/hwui/DeferredLayerUpdater.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/DisplayListOp.h | 226 | ||||
-rw-r--r-- | libs/hwui/DisplayListRenderer.cpp | 11 | ||||
-rw-r--r-- | libs/hwui/FontRenderer.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/GammaFontRenderer.h | 16 | ||||
-rwxr-xr-x | libs/hwui/OpenGLRenderer.cpp | 6 | ||||
-rw-r--r-- | libs/hwui/PathCache.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/Program.h | 2 | ||||
-rw-r--r-- | libs/hwui/ProgramCache.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/RenderNode.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/SkiaShader.cpp | 4 | ||||
-rw-r--r-- | libs/hwui/SkiaShader.h | 9 | ||||
-rw-r--r-- | libs/hwui/SpotShadow.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/TessellationCache.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/TessellationCache.h | 3 | ||||
-rw-r--r-- | libs/hwui/font/Font.cpp | 14 | ||||
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 6 | ||||
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.cpp | 8 | ||||
-rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 2 | ||||
-rw-r--r-- | libs/hwui/tests/main.cpp | 2 |
25 files changed, 187 insertions, 176 deletions
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk index 8cc4d15..81f4d85 100644 --- a/libs/hwui/Android.mk +++ b/libs/hwui/Android.mk @@ -6,8 +6,6 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk # getConfig in external/skia/include/core/SkBitmap.h is deprecated. # Allow Gnu extension: in-class initializer of static 'const float' member. LOCAL_CLANG_CFLAGS += \ - -Wno-unused-parameter \ - -Wno-deprecated-declarations \ -Wno-gnu-static-float-init # Only build libhwui when USE_OPENGL_RENDERER is diff --git a/libs/hwui/AnimationContext.cpp b/libs/hwui/AnimationContext.cpp index a20bdae..d2152ca 100644 --- a/libs/hwui/AnimationContext.cpp +++ b/libs/hwui/AnimationContext.cpp @@ -54,7 +54,7 @@ void AnimationContext::addAnimationHandle(AnimationHandle* handle) { handle->insertAfter(&mNextFrameAnimations); } -void AnimationContext::startFrame(TreeInfo::TraversalMode mode) { +void AnimationContext::startFrame(TreeInfo::TraversalMode /* mode */) { LOG_ALWAYS_FATAL_IF(mCurrentFrameAnimations.mNextHandle, "Missed running animations last frame!"); AnimationHandle* head = mNextFrameAnimations.mNextHandle; diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp index a1bbc06..f45ac50 100644 --- a/libs/hwui/Animator.cpp +++ b/libs/hwui/Animator.cpp @@ -246,11 +246,11 @@ CanvasPropertyPrimitiveAnimator::CanvasPropertyPrimitiveAnimator( , mProperty(property) { } -float CanvasPropertyPrimitiveAnimator::getValue(RenderNode* target) const { +float CanvasPropertyPrimitiveAnimator::getValue(RenderNode* /* target */) const { return mProperty->value; } -void CanvasPropertyPrimitiveAnimator::setValue(RenderNode* target, float value) { +void CanvasPropertyPrimitiveAnimator::setValue(RenderNode* /* target */, float value) { mProperty->value = value; } @@ -269,7 +269,7 @@ CanvasPropertyPaintAnimator::CanvasPropertyPaintAnimator( , mField(field) { } -float CanvasPropertyPaintAnimator::getValue(RenderNode* target) const { +float CanvasPropertyPaintAnimator::getValue(RenderNode* /* target */) const { switch (mField) { case STROKE_WIDTH: return mProperty->value.getStrokeWidth(); @@ -285,7 +285,7 @@ static uint8_t to_uint8(float value) { return static_cast<uint8_t>( c < 0 ? 0 : c > 255 ? 255 : c ); } -void CanvasPropertyPaintAnimator::setValue(RenderNode* target, float value) { +void CanvasPropertyPaintAnimator::setValue(RenderNode* /* target */, float value) { switch (mField) { case STROKE_WIDTH: mProperty->value.setStrokeWidth(value); diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h index 4b8b626..2c7a88f 100644 --- a/libs/hwui/Caches.h +++ b/libs/hwui/Caches.h @@ -386,13 +386,13 @@ private: bool bindIndicesBufferInternal(const GLuint buffer); - static void eventMarkNull(GLsizei length, const GLchar* marker) { } - static void startMarkNull(GLsizei length, const GLchar* marker) { } + static void eventMarkNull(GLsizei /* length */, const GLchar* /* marker */) { } + static void startMarkNull(GLsizei /* length */, const GLchar* /* marker */) { } static void endMarkNull() { } - static void setLabelNull(GLenum type, uint object, GLsizei length, - const char* label) { } - static void getLabelNull(GLenum type, uint object, GLsizei bufferSize, + static void setLabelNull(GLenum /* type */, uint /* object */, GLsizei /* length */, + const char* /* label */) { } + static void getLabelNull(GLenum /* type */, uint /* object */, GLsizei /* bufferSize */, GLsizei* length, char* label) { if (length) *length = 0; if (label) *label = '\0'; diff --git a/libs/hwui/DeferredDisplayList.cpp b/libs/hwui/DeferredDisplayList.cpp index ea1d714..d857bc6 100644 --- a/libs/hwui/DeferredDisplayList.cpp +++ b/libs/hwui/DeferredDisplayList.cpp @@ -55,7 +55,7 @@ public: virtual void replay(OpenGLRenderer& renderer, Rect& dirty, int index) = 0; virtual ~Batch() {} virtual bool purelyDrawBatch() { return false; } - virtual bool coversBounds(const Rect& bounds) { return false; } + virtual bool coversBounds(const Rect& /* bounds */) { return false; } }; class DrawBatch : public Batch { @@ -91,7 +91,7 @@ public: return false; } - virtual void replay(OpenGLRenderer& renderer, Rect& dirty, int index) { + virtual void replay(OpenGLRenderer& renderer, Rect& dirty, int /* index */) { DEFER_LOGD("%d replaying DrawBatch %p, with %d ops (batch id %x, merge id %p)", index, this, mOps.size(), getBatchId(), getMergeId()); @@ -247,7 +247,7 @@ public: if (newClipSideFlags & kClipSide_Bottom) mClipRect.bottom = state->mClip.bottom; } - virtual void replay(OpenGLRenderer& renderer, Rect& dirty, int index) { + virtual void replay(OpenGLRenderer& renderer, Rect& dirty, int /* index */) { DEFER_LOGD("%d replaying MergingDrawBatch %p, with %d ops," " clip flags %x (batch id %x, merge id %p)", index, this, mOps.size(), mClipSideFlags, getBatchId(), getMergeId()); @@ -291,7 +291,7 @@ public: // creates a single operation batch StateOpBatch(const StateOp* op, const DeferredDisplayState* state) : mOp(op), mState(state) {} - virtual void replay(OpenGLRenderer& renderer, Rect& dirty, int index) { + virtual void replay(OpenGLRenderer& renderer, Rect& /* dirty */, int /* index */) { DEFER_LOGD("replaying state op batch %p", this); renderer.restoreDisplayState(*mState); @@ -309,10 +309,10 @@ private: class RestoreToCountBatch : public Batch { public: - RestoreToCountBatch(const StateOp* op, const DeferredDisplayState* state, int restoreCount) : - mState(state), mRestoreCount(restoreCount) {} + RestoreToCountBatch(const StateOp* /* op */, const DeferredDisplayState* state, + int restoreCount) : mState(state), mRestoreCount(restoreCount) {} - virtual void replay(OpenGLRenderer& renderer, Rect& dirty, int index) { + virtual void replay(OpenGLRenderer& renderer, Rect& /* dirty */, int /* index */) { DEFER_LOGD("batch %p restoring to count %d", this, mRestoreCount); renderer.restoreDisplayState(*mState); diff --git a/libs/hwui/DeferredLayerUpdater.cpp b/libs/hwui/DeferredLayerUpdater.cpp index d02455c..16d61fd 100644 --- a/libs/hwui/DeferredLayerUpdater.cpp +++ b/libs/hwui/DeferredLayerUpdater.cpp @@ -97,8 +97,8 @@ void DeferredLayerUpdater::doUpdateTexImage() { sp<GraphicBuffer> buffer = mSurfaceTexture->getCurrentBuffer(); if (buffer != NULL) { // force filtration if buffer size != layer size - forceFilter = mWidth != buffer->getWidth() - || mHeight != buffer->getHeight(); + forceFilter = mWidth != static_cast<int>(buffer->getWidth()) + || mHeight != static_cast<int>(buffer->getHeight()); } #if DEBUG_RENDERER diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h index 7627163..86721e9 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); } diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index 1eefa89..e723027 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -62,8 +62,8 @@ DisplayListData* DisplayListRenderer::finishRecording() { return data; } -void DisplayListRenderer::prepareDirty(float left, float top, - float right, float bottom, bool opaque) { +void DisplayListRenderer::prepareDirty(float /* left */, float /* top */, + float /* right */, float /* bottom */, bool opaque) { LOG_ALWAYS_FATAL_IF(mDisplayListData, "prepareDirty called a second time during a recording!"); @@ -88,7 +88,7 @@ void DisplayListRenderer::interrupt() { void DisplayListRenderer::resume() { } -void DisplayListRenderer::callDrawGLFunction(Functor *functor, Rect& dirty) { +void DisplayListRenderer::callDrawGLFunction(Functor *functor, Rect& /* dirty */) { // Ignore dirty during recording, it matters only when we replay addDrawOp(new (alloc()) DrawFunctorOp(functor)); mDisplayListData->functors.add(functor); @@ -178,7 +178,8 @@ bool DisplayListRenderer::clipRegion(const SkRegion* region, SkRegion::Op op) { return mState.clipRegion(region, op); } -void DisplayListRenderer::drawRenderNode(RenderNode* renderNode, Rect& dirty, int32_t flags) { +void DisplayListRenderer::drawRenderNode(RenderNode* renderNode, Rect& /* dirty */, + int32_t flags) { LOG_ALWAYS_FATAL_IF(!renderNode, "missing rendernode"); // dirty is an out parameter and should not be recorded, @@ -373,7 +374,7 @@ static void simplifyPaint(int color, SkPaint* paint) { void DisplayListRenderer::drawText(const char* text, int bytesCount, int count, float x, float y, const float* positions, const SkPaint* paint, - float totalAdvance, const Rect& bounds, DrawOpMode drawOpMode) { + float totalAdvance, const Rect& bounds, DrawOpMode /* drawOpMode */) { if (!text || count <= 0 || paintWillNotDrawText(*paint)) return; diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index 5b5b098..27ee0dc 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -47,7 +47,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// // TextSetupFunctor /////////////////////////////////////////////////////////////////////////////// -status_t TextSetupFunctor::operator ()(int what, void* data) { +status_t TextSetupFunctor::operator ()(int /* what */, void* data) { Data* typedData = reinterpret_cast<Data*>(data); GLenum glyphFormat = typedData ? typedData->glyphFormat : GL_ALPHA; diff --git a/libs/hwui/GammaFontRenderer.h b/libs/hwui/GammaFontRenderer.h index 46cfd04..3abbad0 100644 --- a/libs/hwui/GammaFontRenderer.h +++ b/libs/hwui/GammaFontRenderer.h @@ -70,7 +70,7 @@ public: } } - FontRenderer& getFontRenderer(const SkPaint* paint) { + FontRenderer& getFontRenderer(const SkPaint* /* paint */) { if (!mRenderer) { mRenderer = new FontRenderer; } @@ -81,7 +81,7 @@ public: return 1; } - uint32_t getFontRendererSize(uint32_t fontRenderer, GLenum format) const { + uint32_t getFontRendererSize(uint32_t /* fontRenderer */, GLenum format) const { return mRenderer ? mRenderer->getCacheSize(format) : 0; } @@ -116,7 +116,7 @@ public: } } - FontRenderer& getFontRenderer(const SkPaint* paint) { + FontRenderer& getFontRenderer(const SkPaint* /* paint */) { if (!mRenderer) { mRenderer = new FontRenderer; mRenderer->setGammaTable(&mGammaTable[0]); @@ -128,14 +128,14 @@ public: return 1; } - uint32_t getFontRendererSize(uint32_t fontRenderer, GLenum format) const { + uint32_t getFontRendererSize(uint32_t /* fontRenderer */, GLenum format) const { return mRenderer ? mRenderer->getCacheSize(format) : 0; } - void describe(ProgramDescription& description, const SkPaint* paint) const { + void describe(ProgramDescription& /* description */, const SkPaint* /* paint */) const { } - void setupProgram(ProgramDescription& description, Program* program) const { + void setupProgram(ProgramDescription& /* description */, Program* /* program */) const { } void endPrecaching(); @@ -171,10 +171,10 @@ public: return renderer->getCacheSize(format); } - void describe(ProgramDescription& description, const SkPaint* paint) const { + void describe(ProgramDescription& /* description */, const SkPaint* /* paint */) const { } - void setupProgram(ProgramDescription& description, Program* program) const { + void setupProgram(ProgramDescription& /* description */, Program* /* program */) const { } void endPrecaching(); diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 96a69f7..866d82d 100755 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -349,7 +349,7 @@ void OpenGLRenderer::resumeAfterLayer() { dirtyClip(); } -void OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) { +void OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& /* dirty */) { if (mState.currentlyIgnored()) return; Rect clip(*mState.currentClipRect()); @@ -402,6 +402,8 @@ void OpenGLRenderer::eventMarkDEBUG(const char* fmt, ...) const { va_end(ap); eventMark(buf); +#else + (void)fmt; #endif } @@ -1048,7 +1050,7 @@ public: } protected: - virtual void shadeSpan(int x, int y, SkPMColor[], int count) { + virtual void shadeSpan(int /* x */, int /* y */, SkPMColor[], int /* count */) { LOG_ALWAYS_FATAL("LayerShader should never be drawn with raster backend."); } diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp index 80f9c2f..37d70f2 100644 --- a/libs/hwui/PathCache.cpp +++ b/libs/hwui/PathCache.cpp @@ -196,7 +196,7 @@ void PathCache::setMaxSize(uint32_t maxSize) { // Callbacks /////////////////////////////////////////////////////////////////////////////// -void PathCache::operator()(PathDescription& entry, PathTexture*& texture) { +void PathCache::operator()(PathDescription& /* entry */, PathTexture*& texture) { removeTexture(texture); } diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h index d05b331..fc7d134 100644 --- a/libs/hwui/Program.h +++ b/libs/hwui/Program.h @@ -281,6 +281,8 @@ struct ProgramDescription { programid k = key(); PROGRAM_LOGD("%s (key = 0x%.8x%.8x)", message, uint32_t(k >> 32), uint32_t(k & 0xffffffff)); +#else + (void)message; #endif } diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp index 62835e0..a5b9851 100644 --- a/libs/hwui/ProgramCache.cpp +++ b/libs/hwui/ProgramCache.cpp @@ -449,7 +449,7 @@ Program* ProgramCache::get(const ProgramDescription& description) { // Program generation /////////////////////////////////////////////////////////////////////////////// -Program* ProgramCache::generateProgram(const ProgramDescription& description, programid key) { +Program* ProgramCache::generateProgram(const ProgramDescription& description, programid /* key */) { String8 vertexShader = generateVertexShader(description); String8 fragmentShader = generateFragmentShader(description); diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 07d4f63..46f50bf 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -280,7 +280,7 @@ void RenderNode::pushStagingPropertiesChanges(TreeInfo& info) { } } -void RenderNode::applyLayerPropertiesToLayer(TreeInfo& info) { +void RenderNode::applyLayerPropertiesToLayer(TreeInfo& /* info */) { if (CC_LIKELY(!mLayer)) return; const LayerProperties& props = properties().layerProperties(); @@ -587,7 +587,7 @@ public: operation->defer(mDeferStruct, saveCount, mLevel, clipToBounds); } inline LinearAllocator& allocator() { return *(mDeferStruct.mAllocator); } - inline void startMark(const char* name) {} // do nothing + inline void startMark(const char* /* name */) {} // do nothing inline void endMark() {} inline int level() { return mLevel; } inline int replayFlags() { return mDeferStruct.mReplayFlags; } diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp index dff19a9..0f7c1d4 100644 --- a/libs/hwui/SkiaShader.cpp +++ b/libs/hwui/SkiaShader.cpp @@ -164,7 +164,7 @@ void SkiaShader::setupProgram(Caches* caches, const mat4& modelViewMatrix, /////////////////////////////////////////////////////////////////////////////// void SkiaLayerShader::describe(Caches*, ProgramDescription& description, - const Extensions&, const SkShader& shader) { + const Extensions&, const SkShader& /* shader */) { description.hasBitmap = true; } @@ -340,7 +340,7 @@ static bool isSimpleGradient(const SkShader::GradientInfo& gradInfo) { } void SkiaGradientShader::describe(Caches*, ProgramDescription& description, - const Extensions& extensions, const SkShader& shader) { + const Extensions& /* extensions */, const SkShader& shader) { SkShader::GradientInfo gradInfo; gradInfo.fColorCount = 0; gradInfo.fColors = NULL; diff --git a/libs/hwui/SkiaShader.h b/libs/hwui/SkiaShader.h index e110ca5..f61ba97 100644 --- a/libs/hwui/SkiaShader.h +++ b/libs/hwui/SkiaShader.h @@ -56,12 +56,13 @@ public: class InvalidSkiaShader { public: - static void describe(Caches* caches, ProgramDescription& description, - const Extensions& extensions, const SkShader& shader) { + static void describe(Caches* /* caches */, ProgramDescription& /* description */, + const Extensions& /* extensions */, const SkShader& /* shader */) { // This shader is unsupported. Skip it. } - static void setupProgram(Caches* caches, const mat4& modelViewMatrix, - GLuint* textureUnit, const Extensions& extensions, const SkShader& shader) { + static void setupProgram(Caches* /* caches */, const mat4& /* modelViewMatrix */, + GLuint* /* textureUnit */, const Extensions& /* extensions */, + const SkShader& /* shader */) { // This shader is unsupported. Skip it. } diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp index b3cfde2..a2e7f89 100644 --- a/libs/hwui/SpotShadow.cpp +++ b/libs/hwui/SpotShadow.cpp @@ -871,7 +871,7 @@ inline Vector2 getCloserVertex(const Vector2& umbraVertex, const Vector2& centro /** * Generate a triangle strip given two convex polygon **/ -void SpotShadow::generateTriangleStrip(bool isCasterOpaque, float shadowStrengthScale, +void SpotShadow::generateTriangleStrip(bool isCasterOpaque, float /* shadowStrengthScale */, Vector2* penumbra, int penumbraLength, Vector2* umbra, int umbraLength, const Vector3* poly, int polyLength, VertexBuffer& shadowTriangleStrip, const Vector2& centroid) { diff --git a/libs/hwui/TessellationCache.cpp b/libs/hwui/TessellationCache.cpp index 1e38f9e..35ec5e9 100644 --- a/libs/hwui/TessellationCache.cpp +++ b/libs/hwui/TessellationCache.cpp @@ -365,7 +365,7 @@ void TessellationCache::clear() { // Callbacks /////////////////////////////////////////////////////////////////////////////// -void TessellationCache::BufferRemovedListener::operator()(Description& description, +void TessellationCache::BufferRemovedListener::operator()(Description& /* description */, Buffer*& buffer) { delete buffer; } diff --git a/libs/hwui/TessellationCache.h b/libs/hwui/TessellationCache.h index a7c50eb..7aaa41e 100644 --- a/libs/hwui/TessellationCache.h +++ b/libs/hwui/TessellationCache.h @@ -178,7 +178,8 @@ private: // holds a pointer, and implicit strong ref to each shadow task of the frame LruCache<ShadowDescription, Task<vertexBuffer_pair_t*>*> mShadowCache; class BufferPairRemovedListener : public OnEntryRemoved<ShadowDescription, Task<vertexBuffer_pair_t*>*> { - void operator()(ShadowDescription& description, Task<vertexBuffer_pair_t*>*& bufferPairTask) { + void operator()(ShadowDescription& /* description */, + Task<vertexBuffer_pair_t*>*& bufferPairTask) { bufferPairTask->decStrong(NULL); } }; diff --git a/libs/hwui/font/Font.cpp b/libs/hwui/font/Font.cpp index 2e6c528..206bd59 100644 --- a/libs/hwui/font/Font.cpp +++ b/libs/hwui/font/Font.cpp @@ -138,7 +138,8 @@ void Font::invalidateTextureCache(CacheTexture* cacheTexture) { } void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int x, int y, - uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) { + uint8_t* /* bitmap */, uint32_t /* bitmapW */, uint32_t /* bitmapH */, Rect* bounds, + const float* /* pos */) { int width = (int) glyph->mBitmapWidth; int height = (int) glyph->mBitmapHeight; @@ -160,7 +161,8 @@ void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int x, int y, } void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int x, int y, - uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) { + uint8_t* /* bitmap */, uint32_t /* bitmapW */, uint32_t /* bitmapH */, Rect* /* bounds */, + const float* /* pos */) { float width = (float) glyph->mBitmapWidth; float height = (float) glyph->mBitmapHeight; @@ -179,7 +181,8 @@ void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int x, int y, } void Font::drawCachedGlyphTransformed(CachedGlyphInfo* glyph, int x, int y, - uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) { + uint8_t* /* bitmap */, uint32_t /* bitmapW */, uint32_t /* bitmapH */, Rect* /* bounds */, + const float* /* pos */) { float width = (float) glyph->mBitmapWidth; float height = (float) glyph->mBitmapHeight; @@ -209,7 +212,8 @@ void Font::drawCachedGlyphTransformed(CachedGlyphInfo* glyph, int x, int y, } void Font::drawCachedGlyphBitmap(CachedGlyphInfo* glyph, int x, int y, uint8_t* bitmap, - uint32_t bitmapWidth, uint32_t bitmapHeight, Rect* bounds, const float* pos) { + uint32_t bitmapWidth, uint32_t /* bitmapHeight */, Rect* /* bounds */, + const float* /* pos */) { int dstX = x + glyph->mBitmapLeft; int dstY = y + glyph->mBitmapTop; @@ -427,7 +431,7 @@ void Font::render(const SkPaint* paint, const char* text, uint32_t start, uint32 } } -void Font::updateGlyphCache(const SkPaint* paint, const SkGlyph& skiaGlyph, +void Font::updateGlyphCache(const SkPaint* /* paint */, const SkGlyph& skiaGlyph, SkGlyphCache* skiaGlyphCache, CachedGlyphInfo* glyph, bool precaching) { glyph->mAdvanceX = skiaGlyph.fAdvanceX; glyph->mAdvanceY = skiaGlyph.fAdvanceY; diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index ee629c0..47f14c8 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -123,13 +123,13 @@ void CanvasContext::updateSurface(ANativeWindow* window) { setSurface(window); } -void CanvasContext::pauseSurface(ANativeWindow* window) { +void CanvasContext::pauseSurface(ANativeWindow* /* window */) { stopDrawing(); } // TODO: don't pass viewport size, it's automatic via EGL -void CanvasContext::setup(int width, int height, const Vector3& lightCenter, float lightRadius, - uint8_t ambientShadowAlpha, uint8_t spotShadowAlpha) { +void CanvasContext::setup(int /* width */, int /* height */, const Vector3& lightCenter, + float lightRadius, uint8_t ambientShadowAlpha, uint8_t spotShadowAlpha) { if (!mCanvas) return; mCanvas->initLight(lightCenter, lightRadius, ambientShadowAlpha, spotShadowAlpha); } diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 3d106b7..d418576 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -340,14 +340,16 @@ void RenderProxy::trimMemory(int level) { } } +template <typename T> +void UNUSED(T) {} + + CREATE_BRIDGE0(fence) { // Intentionally empty + UNUSED(args); return NULL; } -template <typename T> -void UNUSED(T t) {} - void RenderProxy::fence() { SETUP_TASK(fence); UNUSED(args); diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index f887103..6983e2b 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -171,7 +171,7 @@ void RenderThread::initThreadLocals() { mRenderState = new RenderState(*this); } -int RenderThread::displayEventReceiverCallback(int fd, int events, void* data) { +int RenderThread::displayEventReceiverCallback(int /* fd */, int events, void* data) { if (events & (Looper::EVENT_ERROR | Looper::EVENT_HANGUP)) { ALOGE("Display event receiver pipe was closed or an error occurred. " "events=0x%x", events); diff --git a/libs/hwui/tests/main.cpp b/libs/hwui/tests/main.cpp index 64ee5f6..d847d13 100644 --- a/libs/hwui/tests/main.cpp +++ b/libs/hwui/tests/main.cpp @@ -66,7 +66,7 @@ sp<RenderNode> createCard(int x, int y, int width, int height) { return node; } -int main(int argc, char* argv[]) { +int main() { createTestEnvironment(); // create the native surface |