diff options
| author | 2014-01-01 14:45:21 -0800 | |
|---|---|---|
| committer | 2014-01-02 12:57:41 -0800 | |
| commit | d6b65f67717025b1162f86f04e2caa5723566cac (patch) | |
| tree | 4905e0300916badc0fadf76018bf4d53fbe56669 /libs/hwui/OpenGLRenderer.h | |
| parent | 14e513058ed4168c94e015638d16f5f87fd8063a (diff) | |
Use const access to snapshot from OpenGLRenderer
Additionally, move clipping methods to StatefulBaseRenderer
Change-Id: Iff232bf16fc1ad3b7d89493da6d8915db7bc5e4f
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
| -rw-r--r-- | libs/hwui/OpenGLRenderer.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index 1325bf700b3f..b4725d4e9b23 100644 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -170,10 +170,6 @@ public: int saveLayerDeferred(float left, float top, float right, float bottom, int alpha, SkXfermode::Mode mode, int flags); - virtual bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op); - virtual bool clipPath(SkPath* path, SkRegion::Op op); - virtual bool clipRegion(SkRegion* region, SkRegion::Op op); - virtual status_t drawDisplayList(DisplayList* displayList, Rect& dirty, int32_t replayFlags); virtual status_t drawLayer(Layer* layer, float x, float y); virtual status_t drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint); @@ -246,7 +242,7 @@ public: void setDrawModifiers(const DrawModifiers& drawModifiers) { mDrawModifiers = drawModifiers; } ANDROID_API bool isCurrentTransformSimple() { - return currentTransform().isSimple(); + return currentTransform()->isSimple(); } Caches& getCaches() { @@ -258,8 +254,8 @@ public: return mSnapshot->clipRegion->isEmpty(); } - int getViewportWidth() { return getSnapshot()->viewport.getWidth(); } - int getViewportHeight() { return getSnapshot()->viewport.getHeight(); } + int getViewportWidth() { return currentSnapshot()->viewport.getWidth(); } + int getViewportHeight() { return currentSnapshot()->viewport.getHeight(); } /** * Scales the alpha on the current snapshot. This alpha value will be modulated @@ -396,10 +392,6 @@ protected: */ void dirtyLayerUnchecked(Rect& bounds, Region* region); - sp<Snapshot> getSnapshot() const { - return mSnapshot; - } - /** * Returns the region of the current layer. */ @@ -482,12 +474,11 @@ private: /** * Tells the GPU what part of the screen is about to be redrawn. - * This method will use the clip rect that we started drawing the - * frame with. + * This method will use the current layer space clip rect. * This method needs to be invoked every time getTargetFbo() is * bound again. */ - void startTiling(const Snapshot& snapshot, bool opaque = false); + void startTilingCurrentClip(bool opaque = false); /** * Tells the GPU what part of the screen is about to be redrawn. @@ -988,9 +979,6 @@ private: // List of layers to update at the beginning of a frame Vector<Layer*> mLayerUpdates; - // Indicates whether the clip must be restored - bool mDirtyClip; - // The following fields are used to setup drawing // Used to describe the shaders to generate ProgramDescription mDescription; |