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

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: 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
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 29 matching lines...) Expand all
40 fReentranceCount--; 40 fReentranceCount--;
41 if (fReentranceCount == 0) { 41 if (fReentranceCount == 0) {
42 fOwner = kIllegalThreadID; 42 fOwner = kIllegalThreadID;
43 } 43 }
44 } 44 }
45 45
46 SkMutex fMutex; 46 SkMutex fMutex;
47 SkThreadID fOwner; // guarded by fMutex 47 SkThreadID fOwner; // guarded by fMutex
48 int fReentranceCount; // guarded by fMutex 48 int fReentranceCount; // guarded by fMutex
49 }; 49 };
50 #else
51 class GrSingleOwner {}; // Provide a dummy implementation so we can pass pointer s to constructors
50 #endif 52 #endif
51 53
52 #endif 54 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698