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

Unified Diff: gm/yuvtorgbeffect.cpp

Issue 2086293006: Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 6 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 | « gm/texturedomaineffect.cpp ('k') | src/gpu/GrClipMaskManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/yuvtorgbeffect.cpp
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index a153c991fc548c1ff298f17a6edf299ab833f9ad..0be30088c8fbb0452f4e91a869c27a946bac39c7 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -13,7 +13,6 @@
#include "GrContext.h"
#include "GrDrawContextPriv.h"
-#include "GrPipelineBuilder.h"
#include "SkBitmap.h"
#include "SkGr.h"
#include "SkGradientShader.h"
@@ -113,19 +112,19 @@ protected:
{1, 2, 0}, {2, 0, 1}, {2, 1, 0}};
for (int i = 0; i < 6; ++i) {
- GrPipelineBuilder pipelineBuilder;
- pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
+ GrPaint grPaint;
+ grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
sk_sp<GrFragmentProcessor> fp(GrYUVEffect::MakeYUVToRGB(
texture[indices[i][0]], texture[indices[i][1]], texture[indices[i][2]], sizes,
static_cast<SkYUVColorSpace>(space), false));
if (fp) {
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
- pipelineBuilder.addColorFragmentProcessor(std::move(fp));
+ grPaint.addColorFragmentProcessor(std::move(fp));
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix,
renderRect, nullptr, nullptr));
- drawContext->drawContextPriv().testingOnly_drawBatch(pipelineBuilder, batch);
+ drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch);
}
x += renderRect.width() + kTestPad;
}
@@ -225,18 +224,18 @@ protected:
SkScalar y = kDrawPad + kTestPad + space * kColorSpaceOffset;
SkScalar x = kDrawPad + kTestPad;
- GrPipelineBuilder pipelineBuilder;
- pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
+ GrPaint grPaint;
+ grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
sk_sp<GrFragmentProcessor> fp(
GrYUVEffect::MakeYUVToRGB(texture[0], texture[1], texture[2], sizes,
static_cast<SkYUVColorSpace>(space), true));
if (fp) {
SkMatrix viewMatrix;
viewMatrix.setTranslate(x, y);
- pipelineBuilder.addColorFragmentProcessor(fp);
+ grPaint.addColorFragmentProcessor(fp);
SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(
GrColor_WHITE, viewMatrix, renderRect, nullptr, nullptr));
- drawContext->drawContextPriv().testingOnly_drawBatch(pipelineBuilder, batch);
+ drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch);
}
}
}
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | src/gpu/GrClipMaskManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698