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

Unified Diff: src/gpu/GrClipMaskManager.h

Issue 683673002: clear stencil clip on draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@aa_rect_takes_gpu
Patch Set: rebase Created 6 years, 2 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 | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.h
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index ca5a2477db2cfb4c2e11e58ea39ffe6e2ee0e61e..fe1ff0efde6758e3ade70139361203b068775daf 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -11,7 +11,6 @@
#include "GrClipMaskCache.h"
#include "GrContext.h"
#include "GrDrawState.h"
-#include "GrDrawTarget.h"
#include "GrReducedClip.h"
#include "GrStencil.h"
#include "GrTexture.h"
@@ -44,6 +43,16 @@ public:
, fCurrClipMaskType(kNone_ClipMaskType) {
}
+ // The state of the scissor is controlled by the clip manager, no one else should set
+ // Scissor state. This should really be on Gpu itself. We should revist this when GPU
+ // and drawtarget are separate
+ struct ScissorState {
+ ScissorState() : fEnabled(false) {}
+ void set(const SkIRect& rect) { fRect = rect; fEnabled = true; }
+ bool fEnabled;
+ SkIRect fRect;
+ };
+
/**
* Creates a clip mask if necessary as a stencil buffer or alpha texture
* and sets the GrGpu's scissor and stencil state. If the return is false
@@ -55,7 +64,7 @@ public:
const SkRect* devBounds,
GrDrawState::AutoRestoreEffects*,
GrDrawState::AutoRestoreStencil*,
- GrDrawTarget::ScissorState* scissorState);
+ ScissorState* scissorState);
/**
* Purge resources to free up memory. TODO: This class shouldn't hold any long lived refs
« no previous file with comments | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698