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

Side by Side Diff: cc/output/context_provider.h

Issue 1131723002: Add ContextProvider::InvalidateGrContext to reset GL state in GrContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to pure virtual InvalidateGrContext Created 5 years, 7 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 | content/common/gpu/client/context_provider_command_buffer.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 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_OUTPUT_CONTEXT_PROVIDER_H_ 5 #ifndef CC_OUTPUT_CONTEXT_PROVIDER_H_
6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_ 6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "gpu/command_buffer/common/capabilities.h" 11 #include "gpu/command_buffer/common/capabilities.h"
12 12 #include "third_party/skia/include/gpu/GrContext.h"
piman 2015/05/07 01:07:08 nit: you shouldn't need this
13 class GrContext;
14 13
15 namespace base { 14 namespace base {
16 class Lock; 15 class Lock;
17 } 16 }
18 17
19 namespace gpu { 18 namespace gpu {
20 class ContextSupport; 19 class ContextSupport;
21 namespace gles2 { class GLES2Interface; } 20 namespace gles2 { class GLES2Interface; }
22 } 21 }
23 22
(...skipping 13 matching lines...) Expand all
37 virtual gpu::ContextSupport* ContextSupport() = 0; 36 virtual gpu::ContextSupport* ContextSupport() = 0;
38 virtual class GrContext* GrContext() = 0; 37 virtual class GrContext* GrContext() = 0;
39 38
40 struct Capabilities { 39 struct Capabilities {
41 gpu::Capabilities gpu; 40 gpu::Capabilities gpu;
42 size_t max_transfer_buffer_usage_bytes; 41 size_t max_transfer_buffer_usage_bytes;
43 42
44 CC_EXPORT Capabilities(); 43 CC_EXPORT Capabilities();
45 }; 44 };
46 45
46 // Invalidates the cached OpenGL state in GrContext.
47 virtual void InvalidateGrContext(uint32_t state) = 0;
48
47 // Sets up a lock so this context can be used from multiple threads. 49 // Sets up a lock so this context can be used from multiple threads.
48 virtual void SetupLock() = 0; 50 virtual void SetupLock() = 0;
49 51
50 // Returns the lock that should be held if using this context from multiple 52 // Returns the lock that should be held if using this context from multiple
51 // threads. 53 // threads.
52 virtual base::Lock* GetLock() = 0; 54 virtual base::Lock* GetLock() = 0;
53 55
54 // Returns the capabilities of the currently bound 3d context. 56 // Returns the capabilities of the currently bound 3d context.
55 virtual Capabilities ContextCapabilities() = 0; 57 virtual Capabilities ContextCapabilities() = 0;
56 58
(...skipping 28 matching lines...) Expand all
85 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0; 87 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0;
86 88
87 protected: 89 protected:
88 friend class base::RefCountedThreadSafe<ContextProvider>; 90 friend class base::RefCountedThreadSafe<ContextProvider>;
89 virtual ~ContextProvider() {} 91 virtual ~ContextProvider() {}
90 }; 92 };
91 93
92 } // namespace cc 94 } // namespace cc
93 95
94 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ 96 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/context_provider_command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698