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

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

Issue 791823003: Add sRGB texture support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add in changes for copy_to_new_texture_pixelref Created 6 years 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 /* 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
(...skipping 26 matching lines...) Expand all
37 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff); 37 GR_STATIC_ASSERT((int)kISA_GrBlendCoeff == (int)SkXfermode::kISA_Coeff);
38 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff); 38 GR_STATIC_ASSERT((int)kDA_GrBlendCoeff == (int)SkXfermode::kDA_Coeff);
39 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff); 39 GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkXfermode::kIDA_Coeff);
40 40
41 #define sk_blend_to_grblend(X) ((GrBlendCoeff)(X)) 41 #define sk_blend_to_grblend(X) ((GrBlendCoeff)(X))
42 42
43 /////////////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////////////
44 44
45 #include "SkColorPriv.h" 45 #include "SkColorPriv.h"
46 46
47 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType); 47 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType, SkColorProfile Type);
48 48
49 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info) { 49 static inline GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info) {
50 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType()); 50 return SkImageInfo2GrPixelConfig(info.colorType(), info.alphaType(), info.pr ofileType());
51 } 51 }
52 52
53 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); 53 bool GrPixelConfig2ColorAndProfileType(GrPixelConfig, SkColorType*, SkColorProfi leType*);
54 54
55 static inline GrColor SkColor2GrColor(SkColor c) { 55 static inline GrColor SkColor2GrColor(SkColor c) {
56 SkPMColor pm = SkPreMultiplyColor(c); 56 SkPMColor pm = SkPreMultiplyColor(c);
57 unsigned r = SkGetPackedR32(pm); 57 unsigned r = SkGetPackedR32(pm);
58 unsigned g = SkGetPackedG32(pm); 58 unsigned g = SkGetPackedG32(pm);
59 unsigned b = SkGetPackedB32(pm); 59 unsigned b = SkGetPackedB32(pm);
60 unsigned a = SkGetPackedA32(pm); 60 unsigned a = SkGetPackedA32(pm);
61 return GrColorPackRGBA(r, g, b, a); 61 return GrColorPackRGBA(r, g, b, a);
62 } 62 }
63 63
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const SkMatrix& viewM, bool constantColor, GrPaint* g rPaint); 95 const SkMatrix& viewM, bool constantColor, GrPaint* g rPaint);
96 96
97 //////////////////////////////////////////////////////////////////////////////// 97 ////////////////////////////////////////////////////////////////////////////////
98 // Classes 98 // Classes
99 99
100 class SkGlyphCache; 100 class SkGlyphCache;
101 101
102 //////////////////////////////////////////////////////////////////////////////// 102 ////////////////////////////////////////////////////////////////////////////////
103 103
104 #endif 104 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698