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

Side by Side Diff: include/gpu/GrProcessor.h

Issue 631183003: Revert of gl programs rewrite (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | include/gpu/GrTypes.h » ('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 2012 Google Inc. 2 * Copyright 2012 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 GrProcessor_DEFINED 8 #ifndef GrProcessor_DEFINED
9 #define GrProcessor_DEFINED 9 #define GrProcessor_DEFINED
10 10
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 SK_DECLARE_INST_COUNT(GrProcessor) 36 SK_DECLARE_INST_COUNT(GrProcessor)
37 37
38 virtual ~GrProcessor(); 38 virtual ~GrProcessor();
39 39
40 struct InvariantOutput{ 40 struct InvariantOutput{
41 GrColor fColor; 41 GrColor fColor;
42 uint32_t fValidFlags; 42 uint32_t fValidFlags;
43 bool fIsSingleComponent; 43 bool fIsSingleComponent;
44 44
45 InvariantOutput() : fColor(0), fValidFlags(0), fIsSingleComponent(false) {}
46
47 bool isOpaque() const { 45 bool isOpaque() const {
48 return ((fValidFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUn packA(fColor)); 46 return ((fValidFlags & kA_GrColorComponentFlag) && 0xFF == GrColorUn packA(fColor));
49 } 47 }
50 48
51 bool isSolidWhite() const { 49 bool isSolidWhite() const {
52 return (fValidFlags == kRGBA_GrColorComponentFlags && 0xFFFFFFFF == fColor); 50 return (fValidFlags == kRGBA_GrColorComponentFlags && 0xFFFFFFFF == fColor);
53 } 51 }
54 52
55 /** 53 /**
56 * If isSingleComponent is true, then the flag values for r, g, b, and a must all be the 54 * If isSingleComponent is true, then the flag values for r, g, b, and a must all be the
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 * This creates an effect outside of the effect memory pool. The effect's destru ctor will be called 246 * This creates an effect outside of the effect memory pool. The effect's destru ctor will be called
249 * at global destruction time. NAME will be the name of the created GrProcessor. 247 * at global destruction time. NAME will be the name of the created GrProcessor.
250 */ 248 */
251 #define GR_CREATE_STATIC_FRAGMENT_PROCESSOR(NAME, EFFECT_CLASS, ARGS) \ 249 #define GR_CREATE_STATIC_FRAGMENT_PROCESSOR(NAME, EFFECT_CLASS, ARGS) \
252 static SkAlignedSStorage<sizeof(EFFECT_CLASS)> g_##NAME##_Storage; \ 250 static SkAlignedSStorage<sizeof(EFFECT_CLASS)> g_##NAME##_Storage; \
253 static GrFragmentProcessor* \ 251 static GrFragmentProcessor* \
254 NAME SkNEW_PLACEMENT_ARGS(g_##NAME##_Storage.get(), EFFECT_CLASS, ARGS); \ 252 NAME SkNEW_PLACEMENT_ARGS(g_##NAME##_Storage.get(), EFFECT_CLASS, ARGS); \
255 static SkAutoTDestroy<GrFragmentProcessor> NAME##_ad(NAME); 253 static SkAutoTDestroy<GrFragmentProcessor> NAME##_ad(NAME);
256 254
257 #endif 255 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698