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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 // the PM conversions test. To handle this we do the PM conversions test out
side | 385 // the PM conversions test. To handle this we do the PM conversions test out
side |
386 // of fReadPixelsMutex and use a separate mutex to guard it. When it re-ente
rs | 386 // of fReadPixelsMutex and use a separate mutex to guard it. When it re-ente
rs |
387 // readSurfacePixels it will grab fReadPixelsMutex and release it before the
outer | 387 // readSurfacePixels it will grab fReadPixelsMutex and release it before the
outer |
388 // readSurfacePixels proceeds to grab it. | 388 // readSurfacePixels proceeds to grab it. |
389 // TODO: Stop pretending to make GrContext thread-safe for sw rasterization
and provide | 389 // TODO: Stop pretending to make GrContext thread-safe for sw rasterization
and provide |
390 // a mechanism to make a SkPicture safe for multithreaded sw rasterization. | 390 // a mechanism to make a SkPicture safe for multithreaded sw rasterization. |
391 SkMutex fReadPixelsMutex; | 391 SkMutex fReadPixelsMutex; |
392 SkMutex fTestPMConversionsMutex; | 392 SkMutex fTestPMConversionsMutex; |
393 | 393 |
394 // In debug builds we guard against improper thread handling | 394 // In debug builds we guard against improper thread handling |
395 SkDEBUGCODE(mutable GrSingleOwner fSingleOwner;) | 395 // This guard is passed to the GrDrawingManager and, from there to all the |
| 396 // GrDrawContexts. It is also passed to the GrTextureProvider and SkGpuDevi
ce. |
| 397 mutable GrSingleOwner fSingleOwner; |
396 | 398 |
397 struct CleanUpData { | 399 struct CleanUpData { |
398 PFCleanUpFunc fFunc; | 400 PFCleanUpFunc fFunc; |
399 void* fInfo; | 401 void* fInfo; |
400 }; | 402 }; |
401 | 403 |
402 SkTDArray<CleanUpData> fCleanUpData; | 404 SkTDArray<CleanUpData> fCleanUpData; |
403 | 405 |
404 const uint32_t fUniqueID; | 406 const uint32_t fUniqueID; |
405 | 407 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 /** | 444 /** |
443 * A callback similar to the above for use by the TextBlobCache | 445 * A callback similar to the above for use by the TextBlobCache |
444 * TODO move textblob draw calls below context so we can use the call above. | 446 * TODO move textblob draw calls below context so we can use the call above. |
445 */ | 447 */ |
446 static void TextBlobCacheOverBudgetCB(void* data); | 448 static void TextBlobCacheOverBudgetCB(void* data); |
447 | 449 |
448 typedef SkRefCnt INHERITED; | 450 typedef SkRefCnt INHERITED; |
449 }; | 451 }; |
450 | 452 |
451 #endif | 453 #endif |
OLD | NEW |