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

Unified Diff: src/gpu/GrGpu.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/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 73a5264bbc17bb28c114203ecdbf7f242bded264..d8e5681de150eca89714c9d9a8a831772f1b5b35 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -369,8 +369,14 @@ public:
virtual bool isTestingOnlyBackendTexture(GrBackendObject id) const = 0;
virtual void deleteTestingOnlyBackendTexture(GrBackendObject id) const = 0;
- // Given a rt, find or create a stencil buffer and attach it
- bool attachStencilAttachmentToRenderTarget(GrRenderTarget* target);
+ // width and height may be larger than rt (if underlying API allows it).
+ // Returns nullptr if compatible sb could not be created, otherwise the caller owns the ref on
+ // the GrStencilAttachment.
+ virtual GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget*,
+ int width,
+ int height) = 0;
+ // clears target's entire stencil buffer to 0
+ virtual void clearStencil(GrRenderTarget* target) = 0;
// This is only to be used in GL-specific tests.
virtual const GrGLContext* glContextForTesting() const { return nullptr; }
@@ -466,17 +472,6 @@ private:
const SkIRect& srcRect,
const SkIPoint& dstPoint) = 0;
- // width and height may be larger than rt (if underlying API allows it).
- // Should attach the SB to the RT. Returns false if compatible sb could
- // not be created.
- virtual bool createStencilAttachmentForRenderTarget(GrRenderTarget*, int width, int height) = 0;
-
- // attaches an existing SB to an existing RT.
- virtual bool attachStencilAttachmentToRenderTarget(GrStencilAttachment*, GrRenderTarget*) = 0;
-
- // clears target's entire stencil buffer to 0
- virtual void clearStencil(GrRenderTarget* target) = 0;
-
void resetContext() {
this->onResetContext(fResetBits);
fResetBits = 0;
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698