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

Side by Side Diff: src/gpu/SkGpuDevice.h

Issue 2270823002: Some tests around surface creation and snapshotting with color space (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Test wrapped backend textures, too. Make those tests pass. Fix problems when sRGB support is missin… 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
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 SkGpuDevice_DEFINED 8 #ifndef SkGpuDevice_DEFINED
9 #define SkGpuDevice_DEFINED 9 #define SkGpuDevice_DEFINED
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 SkIPoint fClipOrigin; 137 SkIPoint fClipOrigin;
138 GrClipStackClip fClip; 138 GrClipStackClip fClip;
139 SkISize fSize; 139 SkISize fSize;
140 bool fOpaque; 140 bool fOpaque;
141 141
142 enum Flags { 142 enum Flags {
143 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear 143 kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear
144 kIsOpaque_Flag = 1 << 1, //!< Hint from client that rendering to this device will be 144 kIsOpaque_Flag = 1 << 1, //!< Hint from client that rendering to this device will be
145 // opaque even if the config supports alpha . 145 // opaque even if the config supports alpha .
146 }; 146 };
147 static bool CheckAlphaTypeAndGetFlags(const SkImageInfo* info, InitContents init, 147 static bool CheckInfoAndGetFlags(const SkImageInfo* info, InitContents init, unsigned* flags);
148 unsigned* flags);
149 148
150 SkGpuDevice(sk_sp<GrDrawContext>, int width, int height, unsigned flags); 149 SkGpuDevice(sk_sp<GrDrawContext>, int width, int height, unsigned flags);
151 150
152 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; 151 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
153 152
154 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over ride; 153 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over ride;
155 154
156 SkImageFilterCache* getImageFilterCache() override; 155 SkImageFilterCache* getImageFilterCache() override;
157 156
158 bool forceConservativeRasterClip() const override { return true; } 157 bool forceConservativeRasterClip() const override { return true; }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 int sampleCount, 243 int sampleCount,
245 GrSurfaceOrigin, 244 GrSurfaceOrigin,
246 const SkSurfaceProps*); 245 const SkSurfaceProps*);
247 246
248 friend class GrAtlasTextContext; 247 friend class GrAtlasTextContext;
249 friend class SkSurface_Gpu; // for access to surfaceProps 248 friend class SkSurface_Gpu; // for access to surfaceProps
250 typedef SkBaseDevice INHERITED; 249 typedef SkBaseDevice INHERITED;
251 }; 250 };
252 251
253 #endif 252 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698