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

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

Issue 168653002: Change device factories to take SkImageInfo instead of SkBitmap::Config (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix PdfViewer Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | include/pdf/SkPDFDevice.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
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 /////////////////////////////////////////////////////////////////////////////// 44 ///////////////////////////////////////////////////////////////////////////////
45 45
46 #include "SkColorPriv.h" 46 #include "SkColorPriv.h"
47 47
48 /** 48 /**
49 * Convert the SkBitmap::Config to the corresponding PixelConfig, or 49 * Convert the SkBitmap::Config to the corresponding PixelConfig, or
50 * kUnknown_PixelConfig if the conversion cannot be done. 50 * kUnknown_PixelConfig if the conversion cannot be done.
51 */ 51 */
52 GrPixelConfig SkBitmapConfig2GrPixelConfig(SkBitmap::Config); 52 GrPixelConfig SkBitmapConfig2GrPixelConfig(SkBitmap::Config);
53 GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType, SkAlphaType);
53 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*); 54 bool GrPixelConfig2ColorType(GrPixelConfig, SkColorType*);
54 55
55 static inline GrColor SkColor2GrColor(SkColor c) { 56 static inline GrColor SkColor2GrColor(SkColor c) {
56 SkPMColor pm = SkPreMultiplyColor(c); 57 SkPMColor pm = SkPreMultiplyColor(c);
57 unsigned r = SkGetPackedR32(pm); 58 unsigned r = SkGetPackedR32(pm);
58 unsigned g = SkGetPackedG32(pm); 59 unsigned g = SkGetPackedG32(pm);
59 unsigned b = SkGetPackedB32(pm); 60 unsigned b = SkGetPackedB32(pm);
60 unsigned a = SkGetPackedA32(pm); 61 unsigned a = SkGetPackedA32(pm);
61 return GrColorPackRGBA(r, g, b, a); 62 return GrColorPackRGBA(r, g, b, a);
62 } 63 }
(...skipping 26 matching lines...) Expand all
89 90
90 private: 91 private:
91 SkGlyphCache* fStrike; 92 SkGlyphCache* fStrike;
92 GrKey* fKey; 93 GrKey* fKey;
93 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler); 94 // DECLARE_INSTANCE_COUNTER(SkGrFontScaler);
94 }; 95 };
95 96
96 //////////////////////////////////////////////////////////////////////////////// 97 ////////////////////////////////////////////////////////////////////////////////
97 98
98 #endif 99 #endif
OLDNEW
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | include/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698