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

Side by Side Diff: src/gpu/effects/GrCustomXfermode.cpp

Issue 1455273006: Make specialized SrcOver XPFactory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "effects/GrCustomXfermode.h" 8 #include "effects/GrCustomXfermode.h"
9 9
10 #include "GrCoordTransform.h" 10 #include "GrCoordTransform.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 GR_DEFINE_XP_FACTORY_TEST(CustomXPFactory); 388 GR_DEFINE_XP_FACTORY_TEST(CustomXPFactory);
389 const GrXPFactory* CustomXPFactory::TestCreate(GrProcessorTestData* d) { 389 const GrXPFactory* CustomXPFactory::TestCreate(GrProcessorTestData* d) {
390 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1, 390 int mode = d->fRandom->nextRangeU(SkXfermode::kLastCoeffMode + 1,
391 SkXfermode::kLastSeparableMode); 391 SkXfermode::kLastSeparableMode);
392 392
393 return new CustomXPFactory(static_cast<SkXfermode::Mode>(mode)); 393 return new CustomXPFactory(static_cast<SkXfermode::Mode>(mode));
394 } 394 }
395 395
396 /////////////////////////////////////////////////////////////////////////////// 396 ///////////////////////////////////////////////////////////////////////////////
397 397
398 GrXPFactory* GrCustomXfermode::CreateXPFactory(SkXfermode::Mode mode) { 398 const GrXPFactory* GrCustomXfermode::CreateXPFactory(SkXfermode::Mode mode) {
399 if (!GrCustomXfermode::IsSupportedMode(mode)) { 399 if (!GrCustomXfermode::IsSupportedMode(mode)) {
400 return nullptr; 400 return nullptr;
401 } else { 401 } else {
402 return new CustomXPFactory(mode); 402 return new CustomXPFactory(mode);
403 } 403 }
404 } 404 }
OLDNEW
« no previous file with comments | « src/gpu/SkGr.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698