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

Side by Side Diff: src/image/SkImage_Base.h

Issue 2037413002: Add SkSourceGammaTreatment enum so we know how to create mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DM compilation 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
« no previous file with comments | « src/image/SkImageShader.cpp ('k') | src/image/SkImage_Generator.cpp » ('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 SkImage_Base_DEFINED 8 #ifndef SkImage_Base_DEFINED
9 #define SkImage_Base_DEFINED 9 #define SkImage_Base_DEFINED
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // return a read-only copy of the pixels. We promise to not modify them, 43 // return a read-only copy of the pixels. We promise to not modify them,
44 // but only inspect them (or encode them). 44 // but only inspect them (or encode them).
45 virtual bool getROPixels(SkBitmap*, CachingHint = kAllow_CachingHint) const = 0; 45 virtual bool getROPixels(SkBitmap*, CachingHint = kAllow_CachingHint) const = 0;
46 46
47 virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo& info) const { 47 virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo& info) const {
48 return SkSurface::MakeRaster(info); 48 return SkSurface::MakeRaster(info);
49 } 49 }
50 50
51 // Caller must call unref when they are done. 51 // Caller must call unref when they are done.
52 virtual GrTexture* asTextureRef(GrContext*, const GrTextureParams&) const = 0; 52 virtual GrTexture* asTextureRef(GrContext*, const GrTextureParams&,
53 SkSourceGammaTreatment) const = 0;
53 54
54 virtual sk_sp<SkImage> onMakeSubset(const SkIRect&) const = 0; 55 virtual sk_sp<SkImage> onMakeSubset(const SkIRect&) const = 0;
55 56
56 // If a ctx is specified, then only gpu-specific formats are requested. 57 // If a ctx is specified, then only gpu-specific formats are requested.
57 virtual SkData* onRefEncoded(GrContext*) const { return nullptr; } 58 virtual SkData* onRefEncoded(GrContext*) const { return nullptr; }
58 59
59 virtual bool onAsLegacyBitmap(SkBitmap*, LegacyBitmapMode) const; 60 virtual bool onAsLegacyBitmap(SkBitmap*, LegacyBitmapMode) const;
60 61
61 virtual bool onIsLazyGenerated() const { return false; } 62 virtual bool onIsLazyGenerated() const { return false; }
62 63
(...skipping 22 matching lines...) Expand all
85 86
86 static inline SkImage_Base* as_IB(const sk_sp<SkImage>& image) { 87 static inline SkImage_Base* as_IB(const sk_sp<SkImage>& image) {
87 return static_cast<SkImage_Base*>(image.get()); 88 return static_cast<SkImage_Base*>(image.get());
88 } 89 }
89 90
90 static inline const SkImage_Base* as_IB(const SkImage* image) { 91 static inline const SkImage_Base* as_IB(const SkImage* image) {
91 return static_cast<const SkImage_Base*>(image); 92 return static_cast<const SkImage_Base*>(image);
92 } 93 }
93 94
94 #endif 95 #endif
OLDNEW
« no previous file with comments | « src/image/SkImageShader.cpp ('k') | src/image/SkImage_Generator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698