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

Side by Side Diff: src/core/SkSpecialImage.h

Issue 2246193002: Remove isOpaque from SkSpecialImage, just use alpha type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make alphaType pure virtual Created 4 years, 4 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 | src/core/SkSpecialImage.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 2016 Google Inc. 2 * Copyright 2016 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 SkSpecialImage_DEFINED 8 #ifndef SkSpecialImage_DEFINED
9 #define SkSpecialImage_DEFINED 9 #define SkSpecialImage_DEFINED
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 typedef void(*RasterReleaseProc)(void* pixels, ReleaseContext); 46 typedef void(*RasterReleaseProc)(void* pixels, ReleaseContext);
47 47
48 const SkSurfaceProps& props() const { return fProps; } 48 const SkSurfaceProps& props() const { return fProps; }
49 49
50 int width() const { return fSubset.width(); } 50 int width() const { return fSubset.width(); }
51 int height() const { return fSubset.height(); } 51 int height() const { return fSubset.height(); }
52 const SkIRect& subset() const { return fSubset; } 52 const SkIRect& subset() const { return fSubset; }
53 SkColorSpace* getColorSpace() const; 53 SkColorSpace* getColorSpace() const;
54 54
55 uint32_t uniqueID() const { return fUniqueID; } 55 uint32_t uniqueID() const { return fUniqueID; }
56 virtual bool isOpaque() const { return false; } 56 virtual SkAlphaType alphaType() const = 0;
57 virtual size_t getSize() const = 0; 57 virtual size_t getSize() const = 0;
58 58
59 /** 59 /**
60 * Ensures that a special image is backed by a texture (when GrContext is n on-null). If no 60 * Ensures that a special image is backed by a texture (when GrContext is n on-null). If no
61 * transformation is required, the returned image may be the same as this s pecial image. 61 * transformation is required, the returned image may be the same as this s pecial image.
62 * If this special image is from a different GrContext, this will fail. 62 * If this special image is from a different GrContext, this will fail.
63 */ 63 */
64 sk_sp<SkSpecialImage> makeTextureImage(GrContext*); 64 sk_sp<SkSpecialImage> makeTextureImage(GrContext*);
65 65
66 /** 66 /**
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 private: 141 private:
142 const SkSurfaceProps fProps; 142 const SkSurfaceProps fProps;
143 const SkIRect fSubset; 143 const SkIRect fSubset;
144 const uint32_t fUniqueID; 144 const uint32_t fUniqueID;
145 145
146 typedef SkRefCnt INHERITED; 146 typedef SkRefCnt INHERITED;
147 }; 147 };
148 148
149 #endif 149 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkSpecialImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698