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

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

Issue 1348583002: Make skpaint->grpaint flow work for composing draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused inheriteds to satisfy clang Created 5 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 | « include/core/SkShader.h ('k') | include/gpu/GrFragmentProcessor.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
11 #ifndef GrColor_DEFINED 11 #ifndef GrColor_DEFINED
12 #define GrColor_DEFINED 12 #define GrColor_DEFINED
13 13
14 #include "GrTypes.h" 14 #include "GrTypes.h"
15 #include "SkColor.h" 15 #include "SkColor.h"
16 #include "SkColorPriv.h" 16 #include "SkColorPriv.h"
17 #include "SkUnPreMultiply.h" 17 #include "SkUnPreMultiply.h"
18 18
19 /** 19 /**
20 * GrColor is 4 bytes for R, G, B, A, in a specific order defined below. The com ponents are stored 20 * GrColor is 4 bytes for R, G, B, A, in a specific order defined below. Whether the color is
21 * premultiplied. 21 * premultiplied or not depends on the context in which it is being used.
22 */ 22 */
23 typedef uint32_t GrColor; 23 typedef uint32_t GrColor;
24 24
25 // shift amount to assign a component to a GrColor int 25 // shift amount to assign a component to a GrColor int
26 // These shift values are chosen for compatibility with GL attrib arrays 26 // These shift values are chosen for compatibility with GL attrib arrays
27 // ES doesn't allow BGRA vertex attrib order so if they were not in this order 27 // ES doesn't allow BGRA vertex attrib order so if they were not in this order
28 // we'd have to swizzle in shaders. 28 // we'd have to swizzle in shaders.
29 #ifdef SK_CPU_BENDIAN 29 #ifdef SK_CPU_BENDIAN
30 #define GrColor_SHIFT_R 24 30 #define GrColor_SHIFT_R 24
31 #define GrColor_SHIFT_G 16 31 #define GrColor_SHIFT_G 16
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 GR_STATIC_ASSERT(9 == kLATC_GrPixelConfig); 240 GR_STATIC_ASSERT(9 == kLATC_GrPixelConfig);
241 GR_STATIC_ASSERT(10 == kR11_EAC_GrPixelConfig); 241 GR_STATIC_ASSERT(10 == kR11_EAC_GrPixelConfig);
242 GR_STATIC_ASSERT(11 == kASTC_12x12_GrPixelConfig); 242 GR_STATIC_ASSERT(11 == kASTC_12x12_GrPixelConfig);
243 GR_STATIC_ASSERT(12 == kRGBA_float_GrPixelConfig); 243 GR_STATIC_ASSERT(12 == kRGBA_float_GrPixelConfig);
244 GR_STATIC_ASSERT(13 == kAlpha_half_GrPixelConfig); 244 GR_STATIC_ASSERT(13 == kAlpha_half_GrPixelConfig);
245 GR_STATIC_ASSERT(14 == kRGBA_half_GrPixelConfig); 245 GR_STATIC_ASSERT(14 == kRGBA_half_GrPixelConfig);
246 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kFlags) == kGrPixelConfigCnt); 246 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kFlags) == kGrPixelConfigCnt);
247 } 247 }
248 248
249 #endif 249 #endif
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | include/gpu/GrFragmentProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698