Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Unified Diff: src/gpu/gl/GrGLRenderTarget.h

Issue 1333383002: Move some of the adding stencil attachment logic of Gpu and into Render Target. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: spelling Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLRenderTarget.h
diff --git a/src/gpu/gl/GrGLRenderTarget.h b/src/gpu/gl/GrGLRenderTarget.h
index 1e6dc7f767edd9a738415f7b9b2d69da50e67263..0539a08d8190695477cd679c75346ed5afb61225 100644
--- a/src/gpu/gl/GrGLRenderTarget.h
+++ b/src/gpu/gl/GrGLRenderTarget.h
@@ -14,6 +14,7 @@
#include "SkScalar.h"
class GrGLGpu;
+class GrGLStencilAttachment;
class GrGLRenderTarget : public GrRenderTarget {
public:
@@ -29,7 +30,10 @@ public:
GrRenderTarget::SampleConfig fSampleConfig;
};
- GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&);
+ static GrGLRenderTarget* CreateWrapped(GrGLGpu*,
+ const GrSurfaceDesc&,
+ const IDDesc&,
+ int stencilBits);
void setViewport(const GrGLIRect& rect) { fViewport = rect; }
const GrGLIRect& getViewport() const { return fViewport; }
@@ -78,6 +82,13 @@ protected:
size_t onGpuMemorySize() const override;
private:
+ // This ctor is used only for creating wrapped render targets and is only called for the static
+ // create function CreateWrapped(...).
+ GrGLRenderTarget(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, GrGLStencilAttachment*);
+
+ GrGLGpu* getGLGpu() const;
+ bool completeStencilAttachment() override;
+
GrGLuint fRTFBOID;
GrGLuint fTexFBOID;
GrGLuint fMSColorRenderbufferID;
« no previous file with comments | « src/gpu/gl/GrGLGpu.cpp ('k') | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698