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

Unified Diff: src/gpu/GrGpu.h

Issue 678683005: Scissor rect on drawinfo (Closed) Base URL: https://skia.googlesource.com/skia.git@clip_to_target
Patch Set: rebase on master 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 | « src/gpu/GrDrawTarget.h ('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 cb146969827305089f13f987b7c01534f3e9b2f7..34b417cb13f36907bb80249aac384b4b62c8ad7e 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -294,18 +294,6 @@ public:
return fResetTimestamp;
}
- /**
- * These methods are called by the clip manager's setupClipping function
- * which (called as part of GrGpu's implementation of onDraw and
- * onStencilPath member functions.) The GrGpu subclass should flush the
- * stencil state to the 3D API in its implementation of flushGraphicsState.
- */
- void enableScissor(const SkIRect& rect) {
- fScissorState.fEnabled = true;
- fScissorState.fRect = rect;
- }
- void disableScissor() { fScissorState.fEnabled = false; }
-
// GrGpu subclass sets clip bit in the stencil buffer. The subclass is
// free to clear the remaining bits to zero if masked clears are more
// expensive than clearing all bits.
@@ -357,8 +345,8 @@ protected:
// prepares clip flushes gpu state before a draw
bool setupClipAndFlushState(DrawType,
const GrDeviceCoordTexture* dstCopy,
- GrDrawState::AutoRestoreEffects*,
- const SkRect* devBounds);
+ const SkRect* devBounds,
+ GrDrawState::AutoRestoreEffects*);
// Functions used to map clip-respecting stencil tests into normal
// stencil funcs supported by GPUs.
@@ -386,12 +374,6 @@ protected:
return fGeomPoolStateStack.back();
}
- // The state of the scissor is controlled by the clip manager
- struct ScissorState {
- bool fEnabled;
- SkIRect fRect;
- } fScissorState;
-
// Helpers for setting up geometry state
void finalizeReservedVertices();
void finalizeReservedIndices();
@@ -464,7 +446,9 @@ private:
// deltas from previous state at draw time. This function does the
// backend-specific flush of the state.
// returns false if current state is unsupported.
- virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCopy) = 0;
+ virtual bool flushGraphicsState(DrawType,
+ const ScissorState&,
+ const GrDeviceCoordTexture* dstCopy) = 0;
// clears target's entire stencil buffer to 0
virtual void clearStencil(GrRenderTarget* target) = 0;
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698