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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 // from the sw backend. readSurfacePixels is reentrant in one case - when pe rforming | 383 // from the sw backend. readSurfacePixels is reentrant in one case - when pe rforming |
384 // the PM conversions test. To handle this we do the PM conversions test out side | 384 // the PM conversions test. To handle this we do the PM conversions test out side |
385 // of fReadPixelsMutex and use a separate mutex to guard it. When it re-ente rs | 385 // of fReadPixelsMutex and use a separate mutex to guard it. When it re-ente rs |
386 // readSurfacePixels it will grab fReadPixelsMutex and release it before the outer | 386 // readSurfacePixels it will grab fReadPixelsMutex and release it before the outer |
387 // readSurfacePixels proceeds to grab it. | 387 // readSurfacePixels proceeds to grab it. |
388 // TODO: Stop pretending to make GrContext thread-safe for sw rasterization and provide | 388 // TODO: Stop pretending to make GrContext thread-safe for sw rasterization and provide |
389 // a mechanism to make a SkPicture safe for multithreaded sw rasterization. | 389 // a mechanism to make a SkPicture safe for multithreaded sw rasterization. |
390 SkMutex fReadPixelsMutex; | 390 SkMutex fReadPixelsMutex; |
391 SkMutex fTestPMConversionsMutex; | 391 SkMutex fTestPMConversionsMutex; |
392 | 392 |
393 // In debug builds we take a debug mutex to guard against improper thread ha ndling | |
mtklein
2016/01/06 15:08:27
I'd put it right here.
joshualitt
2016/01/06 15:09:47
This will end up being used by a number of Gr* cla
| |
394 SkDEBUGCODE(mutable SkSingleOwner fSingleOwner;) | |
395 | |
393 struct CleanUpData { | 396 struct CleanUpData { |
394 PFCleanUpFunc fFunc; | 397 PFCleanUpFunc fFunc; |
395 void* fInfo; | 398 void* fInfo; |
396 }; | 399 }; |
397 | 400 |
398 SkTDArray<CleanUpData> fCleanUpData; | 401 SkTDArray<CleanUpData> fCleanUpData; |
399 | 402 |
400 const uint32_t fUniqueID; | 403 const uint32_t fUniqueID; |
401 | 404 |
402 SkAutoTDelete<GrDrawingManager> fDrawingManager; | 405 SkAutoTDelete<GrDrawingManager> fDrawingManager; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
438 /** | 441 /** |
439 * A callback similar to the above for use by the TextBlobCache | 442 * A callback similar to the above for use by the TextBlobCache |
440 * TODO move textblob draw calls below context so we can use the call above. | 443 * TODO move textblob draw calls below context so we can use the call above. |
441 */ | 444 */ |
442 static void TextBlobCacheOverBudgetCB(void* data); | 445 static void TextBlobCacheOverBudgetCB(void* data); |
443 | 446 |
444 typedef SkRefCnt INHERITED; | 447 typedef SkRefCnt INHERITED; |
445 }; | 448 }; |
446 | 449 |
447 #endif | 450 #endif |
OLD | NEW |