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

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: tweaks 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 | « gyp/gpu.gypi ('k') | include/gpu/GrDrawContext.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
11 #include "GrCaps.h" 11 #include "GrCaps.h"
12 #include "GrClip.h" 12 #include "GrClip.h"
13 #include "GrColor.h" 13 #include "GrColor.h"
14 #include "GrPaint.h" 14 #include "GrPaint.h"
15 #include "GrRenderTarget.h" 15 #include "GrRenderTarget.h"
16 #include "GrTextureProvider.h" 16 #include "GrTextureProvider.h"
17 #include "SkMatrix.h" 17 #include "SkMatrix.h"
18 #include "../private/SkMutex.h"
19 #include "SkPathEffect.h" 18 #include "SkPathEffect.h"
20 #include "SkTypes.h" 19 #include "SkTypes.h"
20 #include "../private/GrSingleOwner.h"
21 #include "../private/SkMutex.h"
21 22
22 struct GrBatchAtlasConfig; 23 struct GrBatchAtlasConfig;
23 class GrBatchFontCache; 24 class GrBatchFontCache;
24 struct GrContextOptions; 25 struct GrContextOptions;
25 class GrDrawingManager; 26 class GrDrawingManager;
26 class GrDrawContext; 27 class GrDrawContext;
27 class GrDrawTarget; 28 class GrDrawTarget;
28 class GrFragmentProcessor; 29 class GrFragmentProcessor;
29 class GrGpu; 30 class GrGpu;
30 class GrIndexBuffer; 31 class GrIndexBuffer;
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // from the sw backend. readSurfacePixels is reentrant in one case - when pe rforming 384 // 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 385 // 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 386 // 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 387 // readSurfacePixels it will grab fReadPixelsMutex and release it before the outer
387 // readSurfacePixels proceeds to grab it. 388 // readSurfacePixels proceeds to grab it.
388 // 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
389 // a mechanism to make a SkPicture safe for multithreaded sw rasterization. 390 // a mechanism to make a SkPicture safe for multithreaded sw rasterization.
390 SkMutex fReadPixelsMutex; 391 SkMutex fReadPixelsMutex;
391 SkMutex fTestPMConversionsMutex; 392 SkMutex fTestPMConversionsMutex;
392 393
394 // In debug builds we guard against improper thread handling
395 SkDEBUGCODE(mutable GrSingleOwner fSingleOwner;)
396
393 struct CleanUpData { 397 struct CleanUpData {
394 PFCleanUpFunc fFunc; 398 PFCleanUpFunc fFunc;
395 void* fInfo; 399 void* fInfo;
396 }; 400 };
397 401
398 SkTDArray<CleanUpData> fCleanUpData; 402 SkTDArray<CleanUpData> fCleanUpData;
399 403
400 const uint32_t fUniqueID; 404 const uint32_t fUniqueID;
401 405
402 SkAutoTDelete<GrDrawingManager> fDrawingManager; 406 SkAutoTDelete<GrDrawingManager> fDrawingManager;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 /** 442 /**
439 * A callback similar to the above for use by the TextBlobCache 443 * 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. 444 * TODO move textblob draw calls below context so we can use the call above.
441 */ 445 */
442 static void TextBlobCacheOverBudgetCB(void* data); 446 static void TextBlobCacheOverBudgetCB(void* data);
443 447
444 typedef SkRefCnt INHERITED; 448 typedef SkRefCnt INHERITED;
445 }; 449 };
446 450
447 #endif 451 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | include/gpu/GrDrawContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698