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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 817853002: Remove localcoordchange functions off paint (Closed) Base URL: https://skia.googlesource.com/skia.git@local-matrix-on-gp
Patch Set: changing ignores 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
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 5e2c0aa795522a85d0a82b15016e2d8c5a000cdb..e56f4dd77d523ad9f64df980c0435b82e7b552cd 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -425,8 +425,6 @@ void GrClipMaskManager::mergeMask(GrDrawState* drawState,
SkRegion::Op op,
const SkIRect& dstBound,
const SkIRect& srcBound) {
- SkAssertResult(drawState->setIdentityViewMatrix());
-
drawState->setRenderTarget(dstMask->asRenderTarget());
// We want to invert the coverage here
@@ -606,11 +604,11 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
return NULL;
}
- GrDrawState backgroundDrawState(translate);
- backgroundDrawState.enableState(GrDrawState::kClip_StateBit);
- backgroundDrawState.setRenderTarget(result->asRenderTarget());
-
if (useTemp) {
+ GrDrawState backgroundDrawState;
+ backgroundDrawState.enableState(GrDrawState::kClip_StateBit);
+ backgroundDrawState.setRenderTarget(result->asRenderTarget());
+
// Now draw into the accumulator using the real operation and the temp buffer as a
// texture
this->mergeMask(&backgroundDrawState,
@@ -620,6 +618,10 @@ GrTexture* GrClipMaskManager::createAlphaClipMask(int32_t elementsGenID,
maskSpaceIBounds,
maskSpaceElementIBounds);
} else {
+ GrDrawState backgroundDrawState(translate);
+ backgroundDrawState.enableState(GrDrawState::kClip_StateBit);
+ backgroundDrawState.setRenderTarget(result->asRenderTarget());
+
set_coverage_drawing_xpf(op, !invert, &backgroundDrawState);
// Draw to the exterior pixels (those with a zero stencil value).
GR_STATIC_CONST_SAME_STENCIL(kDrawOutsideElement,
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698