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

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

Issue 2186073002: Rename GrContext's newDrawContext & drawContext to makeDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « no previous file | src/core/SkImageFilter.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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 /** 182 /**
183 * Returns a helper object to orchestrate draws. 183 * Returns a helper object to orchestrate draws.
184 * Callers assume the creation ref of the drawContext 184 * Callers assume the creation ref of the drawContext
185 * NULL will be returned if the context has been abandoned. 185 * NULL will be returned if the context has been abandoned.
186 * 186 *
187 * @param rt the render target receiving the draws 187 * @param rt the render target receiving the draws
188 * @param surfaceProps the surface properties (mainly defines text drawing) 188 * @param surfaceProps the surface properties (mainly defines text drawing)
189 * 189 *
190 * @return a draw context 190 * @return a draw context
191 */ 191 */
192 sk_sp<GrDrawContext> drawContext(sk_sp<GrRenderTarget> rt, sk_sp<SkColorSpac e> colorSpace, 192 sk_sp<GrDrawContext> makeDrawContext(sk_sp<GrRenderTarget> rt, sk_sp<SkColor Space> colorSpace,
193 const SkSurfaceProps* = nullptr); 193 const SkSurfaceProps* = nullptr);
194 194
195 /** 195 /**
196 * Create both a GrRenderTarget and a matching GrDrawContext to wrap it. 196 * Create both a GrRenderTarget and a matching GrDrawContext to wrap it.
197 * We guarantee that "asTexture" will succeed for drawContexts created 197 * We guarantee that "asTexture" will succeed for drawContexts created
198 * via this entry point. 198 * via this entry point.
199 */ 199 */
200 sk_sp<GrDrawContext> newDrawContext(SkBackingFit fit, 200 sk_sp<GrDrawContext> makeDrawContext(SkBackingFit fit,
201 int width, int height, 201 int width, int height,
202 GrPixelConfig config, 202 GrPixelConfig config,
203 sk_sp<SkColorSpace> colorSpace, 203 sk_sp<SkColorSpace> colorSpace,
204 int sampleCnt = 0, 204 int sampleCnt = 0,
205 GrSurfaceOrigin origin = kDefault_GrSurf aceOrigin, 205 GrSurfaceOrigin origin = kDefault_GrSur faceOrigin,
206 const SkSurfaceProps* surfaceProps = nul lptr, 206 const SkSurfaceProps* surfaceProps = nu llptr,
207 SkBudgeted = SkBudgeted::kYes); 207 SkBudgeted = SkBudgeted::kYes);
208 208
209 /////////////////////////////////////////////////////////////////////////// 209 ///////////////////////////////////////////////////////////////////////////
210 // Misc. 210 // Misc.
211 211
212 /** 212 /**
213 * Flags that affect flush() behavior. 213 * Flags that affect flush() behavior.
214 */ 214 */
215 enum FlushBits { 215 enum FlushBits {
216 /** 216 /**
217 * A client may reach a point where it has partially rendered a frame 217 * A client may reach a point where it has partially rendered a frame
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 SkAutoTUnref<const GrCaps> fCaps; 496 SkAutoTUnref<const GrCaps> fCaps;
497 uint32_t fContextUniqueID; 497 uint32_t fContextUniqueID;
498 498
499 friend class GrContext; 499 friend class GrContext;
500 friend class SkImage; 500 friend class SkImage;
501 501
502 typedef SkRefCnt INHERITED; 502 typedef SkRefCnt INHERITED;
503 }; 503 };
504 504
505 #endif 505 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698