From 18bf85d4aeedc5989475cadfee735751adac23ad Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Thu, 5 Jun 2014 12:22:15 -0700 Subject: [PATCH] Fix issues around GL on incorrect thread bug:15416165 bug:15414673 DisplayListRenderer must override these callbacks from StatefulBaseRenderer, since the super implementations call GL. Eventually, we'll just have DisplayListRenderer inherit from StatefulBaseRenderer directly. Change-Id: I7b20aa0ac6cae3bf6c6969c63bf9ba98ab2831ff --- libs/hwui/DisplayListRenderer.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index f0ae00fe855a1..dff4f6c54d7e4 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -153,6 +153,11 @@ public: // TODO: rename for consistency virtual status_t callDrawGLFunction(Functor* functor, Rect& dirty); +protected: + // NOTE: must override these to avoid calling into super class, which calls GL. These may be + // removed once DisplayListRenderer no longer inherits from OpenGLRenderer + virtual void onViewportInitialized() {}; + virtual void onSnapshotRestored() {}; private: void insertRestoreToCount();