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

Side by Side Diff: content/common/gpu/client/context_provider_command_buffer.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: 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
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 CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ContextProviderCommandBuffer( 59 ContextProviderCommandBuffer(
60 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d, 60 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d,
61 const std::string& debug_name); 61 const std::string& debug_name);
62 ~ContextProviderCommandBuffer() override; 62 ~ContextProviderCommandBuffer() override;
63 63
64 void OnLostContext(); 64 void OnLostContext();
65 void OnMemoryAllocationChanged(const gpu::MemoryAllocation& allocation); 65 void OnMemoryAllocationChanged(const gpu::MemoryAllocation& allocation);
66 66
67 private: 67 private:
68 void InitializeCapabilities(); 68 void InitializeCapabilities();
69 void DoInvalidateGrContext(uint32_t state) override;
69 70
70 base::ThreadChecker main_thread_checker_; 71 base::ThreadChecker main_thread_checker_;
71 base::ThreadChecker context_thread_checker_; 72 base::ThreadChecker context_thread_checker_;
72 73
73 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d_; 74 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context3d_;
74 scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_; 75 scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_;
75 76
76 cc::ContextProvider::Capabilities capabilities_; 77 cc::ContextProvider::Capabilities capabilities_;
77 std::string debug_name_; 78 std::string debug_name_;
78 79
79 LostContextCallback lost_context_callback_; 80 LostContextCallback lost_context_callback_;
80 MemoryPolicyChangedCallback memory_policy_changed_callback_; 81 MemoryPolicyChangedCallback memory_policy_changed_callback_;
81 82
82 base::Lock main_thread_lock_; 83 base::Lock main_thread_lock_;
83 bool destroyed_; 84 bool destroyed_;
84 85
85 base::Lock context_lock_; 86 base::Lock context_lock_;
86 87
87 class LostContextCallbackProxy; 88 class LostContextCallbackProxy;
88 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; 89 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_;
89 }; 90 };
90 91
91 } // namespace content 92 } // namespace content
92 93
93 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ 94 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698