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

Side by Side Diff: components/surfaces/context_provider_mojo.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: fix int/uint typo 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_ 5 #ifndef COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_
6 #define COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_ 6 #define COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
11 #include "third_party/mojo/src/mojo/public/c/gles2/gles2.h" 11 #include "third_party/mojo/src/mojo/public/c/gles2/gles2.h"
12 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" 12 #include "third_party/mojo/src/mojo/public/cpp/system/core.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 15
16 class ContextProviderMojo : public cc::ContextProvider { 16 class ContextProviderMojo : public cc::ContextProvider {
17 public: 17 public:
18 explicit ContextProviderMojo(ScopedMessagePipeHandle command_buffer_handle); 18 explicit ContextProviderMojo(ScopedMessagePipeHandle command_buffer_handle);
19 19
20 // cc::ContextProvider implementation. 20 // cc::ContextProvider implementation.
21 bool BindToCurrentThread() override; 21 bool BindToCurrentThread() override;
22 gpu::gles2::GLES2Interface* ContextGL() override; 22 gpu::gles2::GLES2Interface* ContextGL() override;
23 gpu::ContextSupport* ContextSupport() override; 23 gpu::ContextSupport* ContextSupport() override;
24 class GrContext* GrContext() override; 24 class GrContext* GrContext() override;
25 void InvalidateGrContext(uint32_t state) override;
25 Capabilities ContextCapabilities() override; 26 Capabilities ContextCapabilities() override;
26 bool IsContextLost() override; 27 bool IsContextLost() override;
27 void VerifyContexts() override {} 28 void VerifyContexts() override {}
28 void DeleteCachedResources() override {} 29 void DeleteCachedResources() override {}
29 bool DestroyedOnMainThread() override; 30 bool DestroyedOnMainThread() override;
30 void SetLostContextCallback( 31 void SetLostContextCallback(
31 const LostContextCallback& lost_context_callback) override; 32 const LostContextCallback& lost_context_callback) override;
32 void SetMemoryPolicyChangedCallback( 33 void SetMemoryPolicyChangedCallback(
33 const MemoryPolicyChangedCallback& memory_policy_changed_callback) 34 const MemoryPolicyChangedCallback& memory_policy_changed_callback)
34 override {} 35 override {}
(...skipping 17 matching lines...) Expand all
52 LostContextCallback lost_context_callback_; 53 LostContextCallback lost_context_callback_;
53 54
54 base::Lock context_lock_; 55 base::Lock context_lock_;
55 56
56 DISALLOW_COPY_AND_ASSIGN(ContextProviderMojo); 57 DISALLOW_COPY_AND_ASSIGN(ContextProviderMojo);
57 }; 58 };
58 59
59 } // namespace mojo 60 } // namespace mojo
60 61
61 #endif // COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_ 62 #endif // COMPONENTS_SURFACES_CONTEXT_PROVIDER_MOJO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698