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

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

Issue 17027003: Add flag bits for partial GrContext reset (Closed)
Patch Set: Fixes (prev checkin was reverted due to assertions) Created 7 years, 5 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/gpu/GrTypes.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef GrContext_DEFINED 10 #ifndef GrContext_DEFINED
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 */ 54 */
55 static int GetThreadInstanceCount(); 55 static int GetThreadInstanceCount();
56 56
57 virtual ~GrContext(); 57 virtual ~GrContext();
58 58
59 /** 59 /**
60 * The GrContext normally assumes that no outsider is setting state 60 * The GrContext normally assumes that no outsider is setting state
61 * within the underlying 3D API's context/device/whatever. This call informs 61 * within the underlying 3D API's context/device/whatever. This call informs
62 * the context that the state was modified and it should resend. Shouldn't 62 * the context that the state was modified and it should resend. Shouldn't
63 * be called frequently for good performance. 63 * be called frequently for good performance.
64 * The flag bits, state, is dpendent on which backend is used by the
65 * context, either GL or D3D (possible in future).
64 */ 66 */
65 void resetContext(); 67 void resetContext(uint32_t state = kAll_GrBackendState);
66 68
67 /** 69 /**
68 * Callback function to allow classes to cleanup on GrContext destruction. 70 * Callback function to allow classes to cleanup on GrContext destruction.
69 * The 'info' field is filled in with the 'info' passed to addCleanUp. 71 * The 'info' field is filled in with the 'info' passed to addCleanUp.
70 */ 72 */
71 typedef void (*PFCleanUpFunc)(const GrContext* context, void* info); 73 typedef void (*PFCleanUpFunc)(const GrContext* context, void* info);
72 74
73 /** 75 /**
74 * Add a function to be called from within GrContext's destructor. 76 * Add a function to be called from within GrContext's destructor.
75 * This gives classes a chance to free resources held on a per context basis . 77 * This gives classes a chance to free resources held on a per context basis .
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 } 1022 }
1021 1023
1022 GrTexture* texture() { return fTexture; } 1024 GrTexture* texture() { return fTexture; }
1023 1025
1024 private: 1026 private:
1025 GrContext* fContext; 1027 GrContext* fContext;
1026 GrTexture* fTexture; 1028 GrTexture* fTexture;
1027 }; 1029 };
1028 1030
1029 #endif 1031 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698