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

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

Issue 2349373004: Create special surfaces according to original device (not always in N32) (Closed)
Patch Set: Remove copy-pasted default parameter, expand comment Created 4 years, 3 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/core/SkMatrixImageFilter.cpp ('k') | 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
11 #include "SkNextID.h" 11 #include "SkNextID.h"
12 #include "SkRefCnt.h" 12 #include "SkRefCnt.h"
13 #include "SkSurfaceProps.h" 13 #include "SkSurfaceProps.h"
14 14
15 #include "SkImageInfo.h" // for SkAlphaType 15 #include "SkImageFilter.h" // for OutputProperties
16 #include "SkImageInfo.h" // for SkAlphaType
16 17
17 class GrContext; 18 class GrContext;
18 class GrTexture; 19 class GrTexture;
19 class SkBitmap; 20 class SkBitmap;
20 class SkCanvas; 21 class SkCanvas;
21 class SkImage; 22 class SkImage;
22 struct SkImageInfo; 23 struct SkImageInfo;
23 class SkPaint; 24 class SkPaint;
24 class SkPixmap; 25 class SkPixmap;
25 class SkSpecialSurface; 26 class SkSpecialSurface;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 uint32_t uniqueID, 80 uint32_t uniqueID,
80 sk_sp<GrTexture>, 81 sk_sp<GrTexture>,
81 sk_sp<SkColorSpace>, 82 sk_sp<SkColorSpace>,
82 const SkSurfaceProps* = nullptr, 83 const SkSurfaceProps* = nullptr,
83 SkAlphaType at = kPremul_SkAlphaTyp e); 84 SkAlphaType at = kPremul_SkAlphaTyp e);
84 #endif 85 #endif
85 86
86 /** 87 /**
87 * Create a new special surface with a backend that is compatible with this special image. 88 * Create a new special surface with a backend that is compatible with this special image.
88 */ 89 */
89 sk_sp<SkSpecialSurface> makeSurface(const SkImageInfo&) const; 90 sk_sp<SkSpecialSurface> makeSurface(const SkImageFilter::OutputProperties& o utProps,
91 const SkISize& size,
92 SkAlphaType at = kPremul_SkAlphaType) co nst;
90 93
91 /** 94 /**
92 * Create a new surface with a backend that is compatible with this special image. 95 * Create a new surface with a backend that is compatible with this special image.
93 * TODO: switch this to makeSurface once we resolved the naming issue 96 * TODO: switch this to makeSurface once we resolved the naming issue
94 */ 97 */
95 sk_sp<SkSurface> makeTightSurface(const SkImageInfo&) const; 98 sk_sp<SkSurface> makeTightSurface(const SkImageFilter::OutputProperties& out Props,
99 const SkISize& size,
100 SkAlphaType at = kPremul_SkAlphaType) cons t;
96 101
97 /** 102 /**
98 * Extract a subset of this special image and return it as a special image. 103 * Extract a subset of this special image and return it as a special image.
99 * It may or may not point to the same backing memory. 104 * It may or may not point to the same backing memory.
100 */ 105 */
101 sk_sp<SkSpecialImage> makeSubset(const SkIRect& subset) const; 106 sk_sp<SkSpecialImage> makeSubset(const SkIRect& subset) const;
102 107
103 /** 108 /**
104 * Extract a subset of this special image and return it as an SkImage. 109 * Extract a subset of this special image and return it as an SkImage.
105 * It may or may not point to the same backing memory. 110 * It may or may not point to the same backing memory.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 145
141 private: 146 private:
142 const SkSurfaceProps fProps; 147 const SkSurfaceProps fProps;
143 const SkIRect fSubset; 148 const SkIRect fSubset;
144 const uint32_t fUniqueID; 149 const uint32_t fUniqueID;
145 150
146 typedef SkRefCnt INHERITED; 151 typedef SkRefCnt INHERITED;
147 }; 152 };
148 153
149 #endif 154 #endif
OLDNEW
« no previous file with comments | « src/core/SkMatrixImageFilter.cpp ('k') | src/core/SkSpecialImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698