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

Side by Side Diff: include/private/GrSingleOwner.h

Issue 1563703004: Make a single GrSingleOwner in GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit 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 | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrContext.cpp » ('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 2016 Google Inc. 2 * Copyright 2016 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 GrSingleOwner_DEFINED 8 #ifndef GrSingleOwner_DEFINED
9 #define GrSingleOwner_DEFINED 9 #define GrSingleOwner_DEFINED
10 10
(...skipping 30 matching lines...) Expand all
41 fReentranceCount--; 41 fReentranceCount--;
42 if (fReentranceCount == 0) { 42 if (fReentranceCount == 0) {
43 fOwner = kIllegalThreadID; 43 fOwner = kIllegalThreadID;
44 } 44 }
45 } 45 }
46 46
47 SkMutex fMutex; 47 SkMutex fMutex;
48 SkThreadID fOwner; // guarded by fMutex 48 SkThreadID fOwner; // guarded by fMutex
49 int fReentranceCount; // guarded by fMutex 49 int fReentranceCount; // guarded by fMutex
50 }; 50 };
51 #else
52 class GrSingleOwner {}; // Provide a dummy implementation so we can pass pointer s to constructors
51 #endif 53 #endif
52 54
53 #endif 55 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698