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

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

Issue 1187523005: Add support for creating texture backed images where Skia will delete the texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add default param to support Chrome's current callers Created 5 years, 6 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/GrGLPathRange.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 32c7d4fd5e5a46488bdacb7c7a89d20030db0f6c..2113a800afd677c2f401ff90b92637858d423641 100644
--- a/src/gpu/gl/GrGLRenderTarget.h
+++ b/src/gpu/gl/GrGLRenderTarget.h
@@ -56,7 +56,9 @@ public:
}
/** When we don't own the FBO ID we don't attempt to modify its attachments. */
- bool canAttemptStencilAttachment() const override { return !fIsWrapped; }
+ bool canAttemptStencilAttachment() const override {
+ return kCached_LifeCycle == fRTLifecycle || kUncached_LifeCycle == fRTLifecycle;
+ }
protected:
// The public constructor registers this object with the cache. However, only the most derived
@@ -74,22 +76,22 @@ protected:
size_t onGpuMemorySize() const override;
private:
- GrGLuint fRTFBOID;
- GrGLuint fTexFBOID;
- GrGLuint fMSColorRenderbufferID;
+ GrGLuint fRTFBOID;
+ GrGLuint fTexFBOID;
+ GrGLuint fMSColorRenderbufferID;
// We track this separately from GrGpuResource because this may be both a texture and a render
// target, and the texture may be wrapped while the render target is not.
- bool fIsWrapped;
+ LifeCycle fRTLifecycle;
// when we switch to this render target we want to set the viewport to
// only render to content area (as opposed to the whole allocation) and
// we want the rendering to be at top left (GL has origin in bottom left)
- GrGLIRect fViewport;
+ GrGLIRect fViewport;
// onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However, abandon and
// release zero out the IDs and the cache needs to know the size even after those actions.
- size_t fGpuMemorySize;
+ size_t fGpuMemorySize;
typedef GrRenderTarget INHERITED;
};
« no previous file with comments | « src/gpu/gl/GrGLPathRange.cpp ('k') | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698