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

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

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