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

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

Issue 1555953004: Create debug only SkSingleOwner (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: create SkSingleOwner Created 4 years, 11 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 | include/private/SkMutex.h » ('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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | include/private/SkMutex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698