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

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

Issue 104893002: Remove problematic GrContext thread local instance counting (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class SK_API GrContext : public SkRefCnt { 44 class SK_API GrContext : public SkRefCnt {
45 public: 45 public:
46 SK_DECLARE_INST_COUNT(GrContext) 46 SK_DECLARE_INST_COUNT(GrContext)
47 47
48 /** 48 /**
49 * Creates a GrContext for a backend context. 49 * Creates a GrContext for a backend context.
50 */ 50 */
51 static GrContext* Create(GrBackend, GrBackendContext); 51 static GrContext* Create(GrBackend, GrBackendContext);
52 52
53 /**
54 * Returns the number of GrContext instances for the current thread.
55 */
56 static int GetThreadInstanceCount();
57
58 virtual ~GrContext(); 53 virtual ~GrContext();
59 54
60 /** 55 /**
61 * The GrContext normally assumes that no outsider is setting state 56 * The GrContext normally assumes that no outsider is setting state
62 * within the underlying 3D API's context/device/whatever. This call informs 57 * within the underlying 3D API's context/device/whatever. This call informs
63 * the context that the state was modified and it should resend. Shouldn't 58 * the context that the state was modified and it should resend. Shouldn't
64 * be called frequently for good performance. 59 * be called frequently for good performance.
65 * The flag bits, state, is dpendent on which backend is used by the 60 * The flag bits, state, is dpendent on which backend is used by the
66 * context, either GL or D3D (possible in future). 61 * context, either GL or D3D (possible in future).
67 */ 62 */
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 } 1037 }
1043 1038
1044 GrTexture* texture() { return fTexture; } 1039 GrTexture* texture() { return fTexture; }
1045 1040
1046 private: 1041 private:
1047 GrContext* fContext; 1042 GrContext* fContext;
1048 GrTexture* fTexture; 1043 GrTexture* fTexture;
1049 }; 1044 };
1050 1045
1051 #endif 1046 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698