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

Side by Side Diff: include/gpu/effects/GrPorterDuffXferProcessor.h

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 #ifndef GrPorterDuffXferProcessor_DEFINED 8 #ifndef GrPorterDuffXferProcessor_DEFINED
9 #define GrPorterDuffXferProcessor_DEFINED 9 #define GrPorterDuffXferProcessor_DEFINED
10 10
11 #include "GrTypes.h" 11 #include "GrTypes.h"
12 #include "GrXferProcessor.h" 12 #include "GrXferProcessor.h"
13 #include "SkXfermode.h" 13 #include "SkXfermode.h"
14 14
15 class GrProcOptInfo; 15 class GrProcOptInfo;
16 16
17 class GrPorterDuffXPFactory : public GrXPFactory { 17 class GrPorterDuffXPFactory : public GrXPFactory {
18 public: 18 public:
19 static GrXPFactory* Create(SkXfermode::Mode mode); 19 static sk_sp<GrXPFactory> Make(SkXfermode::Mode mode);
20 20
21 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, 21 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI,
22 GrXPFactory::InvariantBlendedColor*) const ove rride; 22 GrXPFactory::InvariantBlendedColor*) const ove rride;
23 23
24 24
25 /** Because src-over is so common we special case it for performance reasons . If this returns 25 /** Because src-over is so common we special case it for performance reasons . If this returns
26 null then the SimpleSrcOverXP() below should be used. */ 26 null then the SimpleSrcOverXP() below should be used. */
27 static GrXferProcessor* CreateSrcOverXferProcessor(const GrCaps& caps, 27 static GrXferProcessor* CreateSrcOverXferProcessor(const GrCaps& caps,
28 const GrPipelineOptimizat ions& optimizations, 28 const GrPipelineOptimizat ions& optimizations,
29 bool hasMixedSamples, 29 bool hasMixedSamples,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 GR_DECLARE_XP_FACTORY_TEST; 68 GR_DECLARE_XP_FACTORY_TEST;
69 static void TestGetXPOutputTypes(const GrXferProcessor*, int* outPrimary, in t* outSecondary); 69 static void TestGetXPOutputTypes(const GrXferProcessor*, int* outPrimary, in t* outSecondary);
70 70
71 SkXfermode::Mode fXfermode; 71 SkXfermode::Mode fXfermode;
72 72
73 friend class GrPorterDuffTest; // for TestGetXPOutputTypes() 73 friend class GrPorterDuffTest; // for TestGetXPOutputTypes()
74 typedef GrXPFactory INHERITED; 74 typedef GrXPFactory INHERITED;
75 }; 75 };
76 76
77 #endif 77 #endif
OLDNEW
« no previous file with comments | « include/gpu/effects/GrCustomXfermode.h ('k') | include/gpu/effects/GrXfermodeFragmentProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698