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

Unified Diff: tools/gpu/GrTest.cpp

Issue 1971343002: Convert GrClip to an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_clipout
Patch Set: fix crash Created 4 years, 7 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 | « tests/TessellatingPathRendererTests.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/GrTest.cpp
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 874567dc62ee6c58486197e7bd5af961d90ab179..a301c747cac32b0ca23a6aba6eb72b0623464c77 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -168,8 +168,7 @@ void SkGpuDevice::drawTexture(GrTexture* tex, const SkRect& dst, const SkPaint&
grPaint.addColorTextureProcessor(tex, textureMat);
- GrClip clip;
- fDrawContext->drawRect(clip, grPaint, mat, dst);
+ fDrawContext->drawRect(GrNoClip(), grPaint, mat, dst);
}
@@ -260,8 +259,11 @@ void GrDrawContextPriv::testingOnly_drawBatch(const GrPipelineBuilder& pipelineB
SkDEBUGCODE(fDrawContext->validate();)
GR_AUDIT_TRAIL_AUTO_FRAME(fDrawContext->fAuditTrail, "GrDrawContext::testingOnly_drawBatch");
- const GrClip& drawClip = clip ? *clip : GrClip::WideOpen();
- fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, drawClip, batch);
+ if (clip) {
+ fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, *clip, batch);
+ } else {
+ fDrawContext->getDrawTarget()->drawBatch(pipelineBuilder, GrNoClip(), batch);
+ }
}
#undef ASSERT_SINGLE_OWNER
« no previous file with comments | « tests/TessellatingPathRendererTests.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698