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

Unified Diff: src/gpu/GrInOrderDrawBuffer.h

Issue 211683002: Add discard API to SkCanvas, plumb it to glDiscardFramebuffer() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: move to ToT Created 6 years, 9 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/GrDrawTargetCaps.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrInOrderDrawBuffer.h
diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h
index 72d0f9656ef449c50eab7848f342e579efc774b8..0e0c57db3f93a31024558b5a2bd467592f3fcc87 100644
--- a/src/gpu/GrInOrderDrawBuffer.h
+++ b/src/gpu/GrInOrderDrawBuffer.h
@@ -72,7 +72,9 @@ public:
virtual void clear(const SkIRect* rect,
GrColor color,
bool canIgnoreRect,
- GrRenderTarget* renderTarget = NULL) SK_OVERRIDE;
+ GrRenderTarget* renderTarget) SK_OVERRIDE;
+
+ virtual void discard(GrRenderTarget*) SK_OVERRIDE;
virtual void initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* desc) SK_OVERRIDE;
@@ -125,6 +127,7 @@ private:
GrDeviceCoordTexture fDstCopy;
};
+ // This is also used to record a discard by setting the color to GrColor_ILLEGAL
struct Clear : public ::SkNoncopyable {
Clear() : fRenderTarget(NULL) {}
~Clear() { SkSafeUnref(fRenderTarget); }
« no previous file with comments | « src/gpu/GrDrawTargetCaps.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698