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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 SkIPoint::Make(0,0)); | 297 SkIPoint::Make(0,0)); |
298 return true; | 298 return true; |
299 } | 299 } |
300 | 300 |
301 /** | 301 /** |
302 * After this returns any pending writes to the surface will have been issue
d to the backend 3D API. | 302 * After this returns any pending writes to the surface will have been issue
d to the backend 3D API. |
303 */ | 303 */ |
304 void flushSurfaceWrites(GrSurface* surface); | 304 void flushSurfaceWrites(GrSurface* surface); |
305 | 305 |
306 /** | 306 /** |
307 * Equivalent to flushSurfaceWrites but also performs MSAA resolve if necess
ary. This call is | 307 * Finalizes all pending reads and writes to the surface and also performs a
n MSAA resolve |
308 * used to make the surface contents available to be read in the backend 3D
API, usually for a | 308 * if necessary. |
309 * compositing step external to Skia. | |
310 * | 309 * |
311 * It is not necessary to call this before reading the render target via Ski
a/GrContext. | 310 * It is not necessary to call this before reading the render target via Ski
a/GrContext. |
312 * GrContext will detect when it must perform a resolve before reading pixel
s back from the | 311 * GrContext will detect when it must perform a resolve before reading pixel
s back from the |
313 * surface or using it as a texture. | 312 * surface or using it as a texture. |
314 */ | 313 */ |
315 void prepareSurfaceForExternalRead(GrSurface*); | 314 void prepareSurfaceForExternalIO(GrSurface*); |
316 | 315 |
317 /** | 316 /** |
318 * An ID associated with this context, guaranteed to be unique. | 317 * An ID associated with this context, guaranteed to be unique. |
319 */ | 318 */ |
320 uint32_t uniqueID() { return fUniqueID; } | 319 uint32_t uniqueID() { return fUniqueID; } |
321 | 320 |
322 /////////////////////////////////////////////////////////////////////////// | 321 /////////////////////////////////////////////////////////////////////////// |
323 // Functions intended for internal use only. | 322 // Functions intended for internal use only. |
324 GrGpu* getGpu() { return fGpu; } | 323 GrGpu* getGpu() { return fGpu; } |
325 const GrGpu* getGpu() const { return fGpu; } | 324 const GrGpu* getGpu() const { return fGpu; } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 /** | 454 /** |
456 * A callback similar to the above for use by the TextBlobCache | 455 * A callback similar to the above for use by the TextBlobCache |
457 * TODO move textblob draw calls below context so we can use the call above. | 456 * TODO move textblob draw calls below context so we can use the call above. |
458 */ | 457 */ |
459 static void TextBlobCacheOverBudgetCB(void* data); | 458 static void TextBlobCacheOverBudgetCB(void* data); |
460 | 459 |
461 typedef SkRefCnt INHERITED; | 460 typedef SkRefCnt INHERITED; |
462 }; | 461 }; |
463 | 462 |
464 #endif | 463 #endif |
OLD | NEW |