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

Unified Diff: src/gpu/effects/GrConfigConversionEffect.cpp

Issue 18686007: Make GrPaint have a variable sized array of color and coverage stages rather than a fixed size. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rob's comments Created 7 years, 5 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/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrConfigConversionEffect.cpp
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index fd6264ffe2aaee7969557c03b1d6dc8309236cb2..db6141f8e9a8f922c1ed2f77894fa35e95dfac1b 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -219,7 +219,6 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
// from readTex to tempTex followed by a PM->UPM draw to readTex and finally read the data.
// We then verify that two reads produced the same values.
- GrPaint paint;
AutoEffectUnref pmToUPM1(SkNEW_ARGS(GrConfigConversionEffect, (dataTex,
false,
*pmToUPMRule,
@@ -238,17 +237,21 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
SkAutoTUnref<GrEffectRef> pmToUPMEffect2(CreateEffectRef(pmToUPM2));
context->setRenderTarget(readTex->asRenderTarget());
- paint.colorStage(0)->setEffect(pmToUPMEffect1);
- context->drawRectToRect(paint, kDstRect, kSrcRect);
+ GrPaint paint1;
+ paint1.addColorEffect(pmToUPMEffect1);
+ context->drawRectToRect(paint1, kDstRect, kSrcRect);
readTex->readPixels(0, 0, 256, 256, kRGBA_8888_GrPixelConfig, firstRead);
context->setRenderTarget(tempTex->asRenderTarget());
- paint.colorStage(0)->setEffect(upmToPMEffect);
- context->drawRectToRect(paint, kDstRect, kSrcRect);
+ GrPaint paint2;
+ paint2.addColorEffect(upmToPMEffect);
+ context->drawRectToRect(paint2, kDstRect, kSrcRect);
context->setRenderTarget(readTex->asRenderTarget());
- paint.colorStage(0)->setEffect(pmToUPMEffect2);
- context->drawRectToRect(paint, kDstRect, kSrcRect);
+
+ GrPaint paint3;
+ paint3.addColorEffect(pmToUPMEffect2);
+ context->drawRectToRect(paint3, kDstRect, kSrcRect);
readTex->readPixels(0, 0, 256, 256, kRGBA_8888_GrPixelConfig, secondRead);
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698