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

Unified Diff: src/gpu/GrContext.cpp

Issue 866573002: XPFactory lazily initializie in drawstate / GrPaint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedbackinc Created 5 years, 11 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
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 785691dbba8af5e0d1dfcd848fe40f83c29aa22e..e736121cef6f4115922ec8713cf29e4d7a49a9a6 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1569,19 +1569,14 @@ GrDrawTarget* GrContext::prepareToDraw(GrDrawState* ds,
ASSERT_OWNED_RESOURCE(fRenderTarget.get());
if (ds) {
- if (paint) {
egdaniel 2015/01/21 22:31:36 Do we want to support the case where we have a Dra
bsalomon 2015/01/21 23:03:06 If it's not being used, then let's just update the
- SkASSERT(acf);
- ds->setFromPaint(*paint, fRenderTarget.get());
+ SkASSERT(paint && acf);
+ ds->setFromPaint(*paint, fRenderTarget.get());
#if GR_DEBUG_PARTIAL_COVERAGE_CHECK
egdaniel 2015/01/21 22:31:36 what is this debug check for? is it still useful t
bsalomon 2015/01/21 23:03:06 Since we're on the path to deleting canUFCPP, ok t
- if ((paint->hasMask()) &&
- !fDrawState->canUseFracCoveragePrimProc(paint.getColor(), fGpu->caps())) {
- SkDebugf("Partial pixel coverage will be incorrectly blended.\n");
- }
-#endif
- } else {
- ds->reset();
- ds->setRenderTarget(fRenderTarget.get());
+ if ((paint->hasMask()) &&
+ !fDrawState->canUseFracCoveragePrimProc(paint.getColor(), fGpu->caps())) {
+ SkDebugf("Partial pixel coverage will be incorrectly blended.\n");
}
+#endif
ds->setState(GrDrawState::kClip_StateBit, fClip && !fClip->fClipStack->isWideOpen());
}
fDrawBuffer->setClip(fClip);
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/gpu/GrDrawState.h » ('j') | src/gpu/GrDrawState.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698