OLD | NEW |
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 /** | 185 /** |
186 * Returns a helper object to orchestrate draws. | 186 * Returns a helper object to orchestrate draws. |
187 * Callers assume the creation ref of the drawContext | 187 * Callers assume the creation ref of the drawContext |
188 * NULL will be returned if the context has been abandoned. | 188 * NULL will be returned if the context has been abandoned. |
189 * | 189 * |
190 * @param rt the render target receiving the draws | 190 * @param rt the render target receiving the draws |
191 * @param surfaceProps the surface properties (mainly defines text drawing) | 191 * @param surfaceProps the surface properties (mainly defines text drawing) |
192 * | 192 * |
193 * @return a draw context | 193 * @return a draw context |
194 */ | 194 */ |
195 GrDrawContext* drawContext(GrRenderTarget* rt, const SkSurfaceProps* surface
Props = NULL); | 195 sk_sp<GrDrawContext> drawContext(sk_sp<GrRenderTarget> rt, const SkSurfacePr
ops* = nullptr); |
196 | 196 |
197 /////////////////////////////////////////////////////////////////////////// | 197 /////////////////////////////////////////////////////////////////////////// |
198 // Misc. | 198 // Misc. |
199 | 199 |
200 /** | 200 /** |
201 * Flags that affect flush() behavior. | 201 * Flags that affect flush() behavior. |
202 */ | 202 */ |
203 enum FlushBits { | 203 enum FlushBits { |
204 /** | 204 /** |
205 * A client may reach a point where it has partially rendered a frame | 205 * A client may reach a point where it has partially rendered a frame |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 SkAutoTUnref<const GrCaps> fCaps; | 478 SkAutoTUnref<const GrCaps> fCaps; |
479 uint32_t fContextUniqueID; | 479 uint32_t fContextUniqueID; |
480 | 480 |
481 friend class GrContext; | 481 friend class GrContext; |
482 friend class SkImage; | 482 friend class SkImage; |
483 | 483 |
484 typedef SkRefCnt INHERITED; | 484 typedef SkRefCnt INHERITED; |
485 }; | 485 }; |
486 | 486 |
487 #endif | 487 #endif |
OLD | NEW |