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

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

Issue 2514543002: Defer more renderTargetContexts in the GPU image filter paths - take 2 (Closed)
Patch Set: Add more bullet proofing Created 4 years, 1 month 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/SkBlurImageFilter.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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 int width, int height, 190 int width, int height,
191 GrPixelConfig config, 191 GrPixelConfig config,
192 sk_sp<SkColorSpace> colorSpace, 192 sk_sp<SkColorSpace> colorSpace,
193 int sampleCnt = 0, 193 int sampleCnt = 0,
194 GrSurfaceOrigin origin = kDefau lt_GrSurfaceOrigin, 194 GrSurfaceOrigin origin = kDefau lt_GrSurfaceOrigin,
195 const SkSurfaceProps* surfacePr ops = nullptr, 195 const SkSurfaceProps* surfacePr ops = nullptr,
196 SkBudgeted = SkBudgeted::kYes); 196 SkBudgeted = SkBudgeted::kYes);
197 197
198 // Create a new render target context as above but have it backed by a defer red-style 198 // Create a new render target context as above but have it backed by a defer red-style
199 // GrRenderTargetProxy rather than one that is backed by an actual GrRenderT arget 199 // GrRenderTargetProxy rather than one that is backed by an actual GrRenderT arget
200 sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContext(SkBackingFit fi t, 200 sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContext(
201 SkBackingFit fit,
201 int width, int height, 202 int width, int height,
202 GrPixelConfig config, 203 GrPixelConfig config,
203 sk_sp<SkColorSpace> colorSpace, 204 sk_sp<SkColorSpace> colorSpace,
204 int sampleCnt = 0, 205 int sampleCnt = 0,
205 GrSurfaceOrigin origin = kDefau lt_GrSurfaceOrigin, 206 GrSurfaceOrigin origin = kDefau lt_GrSurfaceOrigin,
206 const SkSurfaceProps* surfacePr ops = nullptr, 207 const SkSurfaceProps* surfacePr ops = nullptr,
207 SkBudgeted = SkBudgeted::kYes); 208 SkBudgeted = SkBudgeted::kYes);
208 /* 209 /*
209 * This method will attempt to create a renderTargetContext that has, at lea st, the number of 210 * This method will attempt to create a renderTargetContext that has, at lea st, the number of
210 * channels and precision per channel as requested in 'config' (e.g., A8 and 888 can be 211 * channels and precision per channel as requested in 'config' (e.g., A8 and 888 can be
211 * converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA) . 212 * converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA) .
212 * SRGB-ness will be preserved. 213 * SRGB-ness will be preserved.
213 */ 214 */
214 sk_sp<GrRenderTargetContext> makeRenderTargetContextWithFallback( 215 sk_sp<GrRenderTargetContext> makeRenderTargetContextWithFallback(
215 SkBackingFit fit, 216 SkBackingFit fit,
216 int width, int height, 217 int width, int height,
217 GrPixelConfig config, 218 GrPixelConfig config,
218 sk_sp<SkColorSpace> colorSpace, 219 sk_sp<SkColorSpace> colorSpace,
219 int sampleCnt = 0, 220 int sampleCnt = 0,
220 GrSurfaceOrigin origin = kDefau lt_GrSurfaceOrigin, 221 GrSurfaceOrigin origin = kDefau lt_GrSurfaceOrigin,
221 const SkSurfaceProps* surfacePr ops = nullptr, 222 const SkSurfaceProps* surfacePr ops = nullptr,
222 SkBudgeted budgeted = SkBudgete d::kYes); 223 SkBudgeted budgeted = SkBudgete d::kYes);
223 224
225 // Create a new render target context as above but have it backed by a defer red-style
226 // GrRenderTargetProxy rather than one that is backed by an actual GrRenderT arget
227 sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContextWithFallback(
228 SkBackingFit fit,
229 int width, int height,
230 GrPixelConfig config,
231 sk_sp<SkColorSpace> colorSpace,
232 int sampleCnt = 0,
233 GrSurfaceOrigin origin = kDefau lt_GrSurfaceOrigin,
234 const SkSurfaceProps* surfacePr ops = nullptr,
235 SkBudgeted budgeted = SkBudgete d::kYes);
236
224 /////////////////////////////////////////////////////////////////////////// 237 ///////////////////////////////////////////////////////////////////////////
225 // Misc. 238 // Misc.
226 239
227 /** 240 /**
228 * Call to ensure all drawing to the context has been issued to the 241 * Call to ensure all drawing to the context has been issued to the
229 * underlying 3D API. 242 * underlying 3D API.
230 */ 243 */
231 void flush(); 244 void flush();
232 245
233 /** 246 /**
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 sk_sp<const GrCaps> fCaps; 494 sk_sp<const GrCaps> fCaps;
482 uint32_t fContextUniqueID; 495 uint32_t fContextUniqueID;
483 496
484 friend class GrContext; 497 friend class GrContext;
485 friend class SkImage; 498 friend class SkImage;
486 499
487 typedef SkRefCnt INHERITED; 500 typedef SkRefCnt INHERITED;
488 }; 501 };
489 502
490 #endif 503 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698