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

Unified Diff: include/gpu/GrRenderTarget.h

Issue 938383004: Dynamically create stencil buffer when needed. (Closed) Base URL: https://skia.googlesource.com/skia.git@bigstencil
Patch Set: Actually save file before uploading Created 5 years, 10 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 | « gyp/gpu.gypi ('k') | include/gpu/GrTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrRenderTarget.h
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index 49cea63a37ed242e37afc73e1c4c73476a96f6cb..40e006aa8aec8edb70b28cec5a3274f5b7f0e110 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -12,6 +12,7 @@
#include "SkRect.h"
class GrStencilBuffer;
+class GrRenderTargetPriv;
/**
* GrRenderTarget represents a 2D buffer of pixels that can be rendered to.
@@ -88,11 +89,9 @@ public:
};
virtual ResolveType getResolveType() const = 0;
- /**
- * GrStencilBuffer is not part of the public API.
- */
- GrStencilBuffer* getStencilBuffer() const { return fStencilBuffer; }
- void setStencilBuffer(GrStencilBuffer* stencilBuffer);
+ // Provides access to functions that aren't part of the public API.
+ GrRenderTargetPriv renderTargetPriv();
+ const GrRenderTargetPriv renderTargetPriv() const;
protected:
GrRenderTarget(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc)
@@ -106,6 +105,11 @@ protected:
void onRelease() SK_OVERRIDE;
private:
+ // Checked when this object is asked to attach a stencil buffer.
+ virtual bool canAttemptStencilAttachment() const = 0;
+
+ friend class GrRenderTargetPriv;
+
GrStencilBuffer* fStencilBuffer;
SkIRect fResolveRect;
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698