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

Side by Side Diff: include/gpu/GrContext.h

Issue 2296193005: Add a makeDrawContextWithFallback that handles config fallback (Closed)
Patch Set: update 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 | « no previous file | src/effects/SkAlphaThresholdFilter.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 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 GrContext_DEFINED 8 #ifndef GrContext_DEFINED
9 #define GrContext_DEFINED 9 #define GrContext_DEFINED
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 */ 187 */
188 sk_sp<GrDrawContext> makeDrawContext(SkBackingFit fit, 188 sk_sp<GrDrawContext> makeDrawContext(SkBackingFit fit,
189 int width, int height, 189 int width, int height,
190 GrPixelConfig config, 190 GrPixelConfig config,
191 sk_sp<SkColorSpace> colorSpace, 191 sk_sp<SkColorSpace> colorSpace,
192 int sampleCnt = 0, 192 int sampleCnt = 0,
193 GrSurfaceOrigin origin = kDefault_GrSur faceOrigin, 193 GrSurfaceOrigin origin = kDefault_GrSur faceOrigin,
194 const SkSurfaceProps* surfaceProps = nu llptr, 194 const SkSurfaceProps* surfaceProps = nu llptr,
195 SkBudgeted = SkBudgeted::kYes); 195 SkBudgeted = SkBudgeted::kYes);
196 196
197 /*
198 * This method will attempt to create a drawContext that has, at least, the number of
199 * channels and precision per channel as requested in 'config' (e.g., A8 and 888 can be
200 * converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA) .
201 * SRGB-ness will be preserved.
202 */
203 sk_sp<GrDrawContext> makeDrawContextWithFallback(
204 SkBackingFit fit,
205 int width, int height,
206 GrPixelConfig config,
207 sk_sp<SkColorSpace> colorSpace,
208 int sampleCnt = 0,
209 GrSurfaceOrigin origin = kDefau lt_GrSurfaceOrigin,
210 const SkSurfaceProps* surfacePr ops = nullptr,
211 SkBudgeted budgeted = SkBudgete d::kYes);
212
197 /////////////////////////////////////////////////////////////////////////// 213 ///////////////////////////////////////////////////////////////////////////
198 // Misc. 214 // Misc.
199 215
200 /** 216 /**
201 * Flags that affect flush() behavior. 217 * Flags that affect flush() behavior.
202 */ 218 */
203 enum FlushBits { 219 enum FlushBits {
204 /** 220 /**
205 * A client may reach a point where it has partially rendered a frame 221 * A client may reach a point where it has partially rendered a frame
206 * through a GrContext that it knows the user will never see. This flag 222 * through a GrContext that it knows the user will never see. This flag
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 SkAutoTUnref<const GrCaps> fCaps; 499 SkAutoTUnref<const GrCaps> fCaps;
484 uint32_t fContextUniqueID; 500 uint32_t fContextUniqueID;
485 501
486 friend class GrContext; 502 friend class GrContext;
487 friend class SkImage; 503 friend class SkImage;
488 504
489 typedef SkRefCnt INHERITED; 505 typedef SkRefCnt INHERITED;
490 }; 506 };
491 507
492 #endif 508 #endif
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698