diff options
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rw-r--r-- | libs/hwui/OpenGLRenderer.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index 066b26731a78..4ff578003441 100644 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -57,6 +57,7 @@ namespace android { namespace uirenderer { class DeferredDisplayState; +class RenderState; class RenderNode; class TextSetupFunctor; class VertexBuffer; @@ -119,33 +120,31 @@ enum ModelViewMode { */ class OpenGLRenderer : public StatefulBaseRenderer { public: - ANDROID_API OpenGLRenderer(); + OpenGLRenderer(RenderState& renderState); virtual ~OpenGLRenderer(); - ANDROID_API void initProperties(); + void initProperties(); virtual void onViewportInitialized(); virtual status_t prepareDirty(float left, float top, float right, float bottom, bool opaque); virtual void finish(); - virtual void interrupt(); - virtual void resume(); - ANDROID_API void setCountOverdrawEnabled(bool enabled) { + void setCountOverdrawEnabled(bool enabled) { mCountOverdraw = enabled; } - ANDROID_API float getOverdraw() { + float getOverdraw() { return mCountOverdraw ? mOverdraw : 0.0f; } virtual status_t callDrawGLFunction(Functor* functor, Rect& dirty); - ANDROID_API void pushLayerUpdate(Layer* layer); - ANDROID_API void cancelLayerUpdate(Layer* layer); - ANDROID_API void clearLayerUpdates(); - ANDROID_API void flushLayerUpdates(); + void pushLayerUpdate(Layer* layer); + void cancelLayerUpdate(Layer* layer); + void clearLayerUpdates(); + void flushLayerUpdates(); - ANDROID_API virtual int saveLayer(float left, float top, float right, float bottom, + virtual int saveLayer(float left, float top, float right, float bottom, const SkPaint* paint, int flags) { return saveLayer(left, top, right, bottom, paint, flags, NULL); } @@ -231,7 +230,7 @@ public: const DrawModifiers& getDrawModifiers() { return mDrawModifiers; } void setDrawModifiers(const DrawModifiers& drawModifiers) { mDrawModifiers = drawModifiers; } - ANDROID_API bool isCurrentTransformSimple() { + bool isCurrentTransformSimple() { return currentTransform()->isSimple(); } @@ -474,6 +473,8 @@ protected: return false; } + inline RenderState& renderState() { return mRenderState; } + private: /** * Discards the content of the framebuffer if supported by the driver. @@ -977,6 +978,7 @@ private: // Various caches Caches& mCaches; Extensions& mExtensions; + RenderState& mRenderState; // List of rectangles to clear after saveLayer() is invoked Vector<Rect*> mLayers; @@ -1012,7 +1014,6 @@ private: bool mSkipOutlineClip; - friend class DisplayListRenderer; friend class Layer; friend class TextSetupFunctor; friend class DrawBitmapOp; |