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

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: cleanup 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
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 785691dbba8af5e0d1dfcd848fe40f83c29aa22e..a0fc678a4056c7d2d2c0b803680baa637c370bd7 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -44,13 +44,6 @@
#include "effects/GrDashingEffect.h"
#include "effects/GrSingleTextureEffect.h"
-#ifdef SK_DEBUG
- // change this to a 1 to see notifications when partial coverage fails
- #define GR_DEBUG_PARTIAL_COVERAGE_CHECK 0
-#else
- #define GR_DEBUG_PARTIAL_COVERAGE_CHECK 0
-#endif
-
static const size_t DRAW_BUFFER_VBPOOL_BUFFER_SIZE = 1 << 15;
static const int DRAW_BUFFER_VBPOOL_PREALLOC_BUFFERS = 4;
@@ -463,7 +456,6 @@ void GrContext::OverBudgetCB(void* data) {
context->fFlushToReduceCacheSize = true;
}
-
GrTexture* GrContext::createUncachedTexture(const GrSurfaceDesc& desc,
void* srcData,
size_t rowBytes) {
@@ -1569,19 +1561,8 @@ GrDrawTarget* GrContext::prepareToDraw(GrDrawState* ds,
ASSERT_OWNED_RESOURCE(fRenderTarget.get());
if (ds) {
- if (paint) {
- SkASSERT(acf);
- ds->setFromPaint(*paint, fRenderTarget.get());
-#if GR_DEBUG_PARTIAL_COVERAGE_CHECK
- 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());
- }
+ SkASSERT(paint && acf);
+ ds->setFromPaint(*paint, fRenderTarget.get());
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698