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

Unified Diff: src/gpu/GrOptDrawState.cpp

Issue 816513003: Stop creating GrODS for stencilPath commands. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years 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
Index: src/gpu/GrOptDrawState.cpp
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index b5fe8d5b60891c058de809b4a8e5da1423e94e78..d5018a001560660c23ce57c86f0a1772dbf0d1f9 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -17,7 +17,7 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
const GrGeometryProcessor* gp,
const GrPathProcessor* pathProc,
const GrDrawTargetCaps& caps,
- const ScissorState& scissorState,
+ const GrScissorState& scissorState,
const GrDeviceCoordTexture* dstCopy,
GrGpu::DrawType drawType)
: fFinalized(false) {
@@ -26,13 +26,11 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
// Copy GeometryProcesssor from DS or ODS
if (gp) {
SkASSERT(!pathProc);
- SkASSERT(!(GrGpu::IsPathRenderingDrawType(drawType) ||
- GrGpu::kStencilPath_DrawType == drawType));
+ SkASSERT(!GrGpu::IsPathRenderingDrawType(drawType));
fGeometryProcessor.reset(gp);
fPrimitiveProcessor.reset(gp);
} else {
- SkASSERT(!gp && pathProc && (GrGpu::IsPathRenderingDrawType(drawType) ||
- GrGpu::kStencilPath_DrawType == drawType));
+ SkASSERT(!gp && pathProc && GrGpu::IsPathRenderingDrawType(drawType));
fPrimitiveProcessor.reset(pathProc);
}
@@ -65,8 +63,7 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
// When path rendering the stencil settings are not always set on the draw state
// so we must check the draw type. In cases where we will skip drawing we simply return a
// null GrOptDrawState.
- if (!xferProcessor || ((GrXferProcessor::kSkipDraw_OptFlag & optFlags) &&
- GrGpu::kStencilPath_DrawType != drawType)) {
+ if (!xferProcessor || (GrXferProcessor::kSkipDraw_OptFlag & optFlags)) {
// Set the fields that don't default init and return. The lack of a render target will
// indicate that this can be skipped.
fFlags = 0;

Powered by Google App Engine
This is Rietveld 408576698