summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-05-07 21:48:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-07 21:48:20 +0000
commitef27453cf71e331e4076df5e5c665b06d5c3e050 (patch)
treeaebb0a1e9f798f064ed92bedb7865cd10dfbe118 /libs
parent4f0128fb8fc1e56ead8ba7bccd9fab2ff9c3b29a (diff)
parent832b151465ed81c43e59891d5eebe62128b21fbb (diff)
downloadframeworks_base-ef27453cf71e331e4076df5e5c665b06d5c3e050.zip
frameworks_base-ef27453cf71e331e4076df5e5c665b06d5c3e050.tar.gz
frameworks_base-ef27453cf71e331e4076df5e5c665b06d5c3e050.tar.bz2
Merge "Cleanup attachFunctor"
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp40
-rw-r--r--libs/hwui/OpenGLRenderer.h5
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp5
3 files changed, 1 insertions, 49 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 95fdb04..6de369c 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -379,49 +379,9 @@ void OpenGLRenderer::resumeAfterLayer() {
dirtyClip();
}
-void OpenGLRenderer::detachFunctor(Functor* functor) {
- mFunctors.remove(functor);
-}
-
-void OpenGLRenderer::attachFunctor(Functor* functor) {
- mFunctors.add(functor);
-}
-
-status_t OpenGLRenderer::invokeFunctors(Rect& dirty) {
- status_t result = DrawGlInfo::kStatusDone;
- size_t count = mFunctors.size();
-
- if (count > 0) {
- interrupt();
- SortedVector<Functor*> functors(mFunctors);
- mFunctors.clear();
-
- DrawGlInfo info;
- info.clipLeft = 0;
- info.clipTop = 0;
- info.clipRight = 0;
- info.clipBottom = 0;
- info.isLayer = false;
- info.width = 0;
- info.height = 0;
- memset(info.transform, 0, sizeof(float) * 16);
-
- for (size_t i = 0; i < count; i++) {
- Functor* f = functors.itemAt(i);
- result |= (*f)(DrawGlInfo::kModeProcess, &info);
- }
- resume();
- }
-
- return result;
-}
-
status_t OpenGLRenderer::callDrawGLFunction(Functor* functor, Rect& dirty) {
if (currentSnapshot()->isIgnored()) return DrawGlInfo::kStatusDone;
- detachFunctor(functor);
-
-
Rect clip(*currentClipRect());
clip.snapToPixelBoundaries();
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 7794abc..4de52ac 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -151,9 +151,6 @@ public:
return mCountOverdraw ? mOverdraw : 0.0f;
}
- ANDROID_API status_t invokeFunctors(Rect& dirty);
- ANDROID_API void detachFunctor(Functor* functor);
- ANDROID_API void attachFunctor(Functor* functor);
virtual status_t callDrawGLFunction(Functor* functor, Rect& dirty);
ANDROID_API void pushLayerUpdate(Layer* layer);
@@ -959,8 +956,6 @@ private:
// List of rectangles to clear after saveLayer() is invoked
Vector<Rect*> mLayers;
- // List of functors to invoke after a frame is drawn
- SortedVector<Functor*> mFunctors;
// List of layers to update at the beginning of a frame
Vector<Layer*> mLayerUpdates;
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index f0d190d..5a23158 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -496,10 +496,7 @@ void CanvasContext::invokeFunctor(Functor* functor) {
requireGlContext();
mode = DrawGlInfo::kModeProcess;
}
- // TODO: Remove the dummy info in the future
- DrawGlInfo dummyInfo;
- memset(&dummyInfo, 0, sizeof(DrawGlInfo));
- (*functor)(mode, &dummyInfo);
+ (*functor)(mode, NULL);
if (mCanvas) {
mCanvas->resume();