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

Unified Diff: tests/GrPorterDuffTest.cpp

Issue 1164973002: Add mixed samples support to XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@upload2_reenablebea
Patch Set: Created 5 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 | « src/gpu/gl/GrGLXferProcessor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GrPorterDuffTest.cpp
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index c56af1df0559a5bd70f0dcd4394057f5c02389d1..730d7bdc1e684dde84ce0df69551079307806c67 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -75,10 +75,11 @@ public:
XPInfo(skiatest::Reporter* reporter, SkXfermode::Mode xfermode, const GrCaps& caps,
const GrProcOptInfo& colorPOI, const GrProcOptInfo& covPOI) {
SkAutoTUnref<GrXPFactory> xpf(GrPorterDuffXPFactory::Create(xfermode));
- SkAutoTUnref<GrXferProcessor> xp(xpf->createXferProcessor(colorPOI, covPOI, 0, caps));
- TEST_ASSERT(!xpf->willNeedDstTexture(caps, colorPOI, covPOI));
+ SkAutoTUnref<GrXferProcessor> xp(
+ xpf->createXferProcessor(colorPOI, covPOI, false, NULL, caps));
+ TEST_ASSERT(!xpf->willNeedDstTexture(caps, colorPOI, covPOI, false));
xpf->getInvariantBlendedColor(colorPOI, &fBlendedColor);
- fOptFlags = xp->getOptimizations(colorPOI, covPOI, false, 0, caps);
+ fOptFlags = xp->getOptimizations(colorPOI, covPOI, false, NULL, caps);
GetXPOutputTypes(xp, &fPrimaryOutputType, &fSecondaryOutputType);
xp->getBlendInfo(&fBlendInfo);
TEST_ASSERT(!xp->willReadDstColor());
@@ -922,9 +923,10 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
SkASSERT(covPOI.isFourChannelOutput());
SkAutoTUnref<GrXPFactory> xpf(GrPorterDuffXPFactory::Create(SkXfermode::kSrcOver_Mode));
- TEST_ASSERT(!xpf->willNeedDstTexture(caps, colorPOI, covPOI));
+ TEST_ASSERT(!xpf->willNeedDstTexture(caps, colorPOI, covPOI, false));
- SkAutoTUnref<GrXferProcessor> xp(xpf->createXferProcessor(colorPOI, covPOI, 0, caps));
+ SkAutoTUnref<GrXferProcessor> xp(
+ xpf->createXferProcessor(colorPOI, covPOI, false, NULL, caps));
if (!xp) {
ERRORF(reporter, "Failed to create an XP with LCD coverage.");
return;
@@ -994,12 +996,10 @@ static void test_no_dual_source_blending(skiatest::Reporter* reporter) {
for (int m = 0; m <= SkXfermode::kLastCoeffMode; m++) {
SkXfermode::Mode xfermode = static_cast<SkXfermode::Mode>(m);
SkAutoTUnref<GrXPFactory> xpf(GrPorterDuffXPFactory::Create(xfermode));
- SkAutoTUnref<GrXferProcessor> xp;
- if (xpf->willNeedDstTexture(caps, colorPOI, covPOI)) {
- xp.reset(xpf->createXferProcessor(colorPOI, covPOI, &fakeDstTexture, caps));
- } else {
- xp.reset(xpf->createXferProcessor(colorPOI, covPOI, NULL, caps));
- }
+ GrXferProcessor::DstTexture* dstTexture =
+ xpf->willNeedDstTexture(caps, colorPOI, covPOI, false) ? &fakeDstTexture : 0;
+ SkAutoTUnref<GrXferProcessor> xp(
+ xpf->createXferProcessor(colorPOI, covPOI, false, dstTexture, caps));
if (!xp) {
ERRORF(reporter, "Failed to create an XP without dual source blending.");
return;
« no previous file with comments | « src/gpu/gl/GrGLXferProcessor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698