diff options
Diffstat (limited to 'libs/hwui/renderthread')
| -rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 17 | ||||
| -rw-r--r-- | libs/hwui/renderthread/EglManager.cpp | 1 | ||||
| -rw-r--r-- | libs/hwui/renderthread/RenderProxy.cpp | 8 | ||||
| -rw-r--r-- | libs/hwui/renderthread/RenderThread.cpp | 2 |
4 files changed, 13 insertions, 15 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 5aeecd2..5cd5f69 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -123,13 +123,13 @@ void CanvasContext::updateSurface(ANativeWindow* window) { setSurface(window); } -bool CanvasContext::pauseSurface(ANativeWindow* /* window */) { +bool CanvasContext::pauseSurface(ANativeWindow* window) { return mRenderThread.removeFrameCallback(this); } // 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); } @@ -224,24 +224,23 @@ void CanvasContext::draw() { profiler().unionDirty(&dirty); } - status_t status; if (!dirty.isEmpty()) { - status = mCanvas->prepareDirty(dirty.fLeft, dirty.fTop, + mCanvas->prepareDirty(dirty.fLeft, dirty.fTop, dirty.fRight, dirty.fBottom, mOpaque); } else { - status = mCanvas->prepare(mOpaque); + mCanvas->prepare(mOpaque); } Rect outBounds; - status |= mCanvas->drawRenderNode(mRootRenderNode.get(), outBounds); + mCanvas->drawRenderNode(mRootRenderNode.get(), outBounds); profiler().draw(mCanvas); - mCanvas->finish(); + bool drew = mCanvas->finish(); profiler().markPlaybackEnd(); - if (status & DrawGlInfo::kStatusDrew) { + if (drew) { swapBuffers(); } else { mEglManager.cancelFrame(); diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp index 8fb1b10..9b8bc6c 100644 --- a/libs/hwui/renderthread/EglManager.cpp +++ b/libs/hwui/renderthread/EglManager.cpp @@ -19,6 +19,7 @@ #include <cutils/log.h> #include <cutils/properties.h> +#include "../Caches.h" #include "../RenderState.h" #include "RenderThread.h" diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 36ba3a9..4ad1c40 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -339,16 +339,14 @@ 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 6a55475..38cb4cd 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); |
