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

Side by Side Diff: mojo/cc/context_provider_mojo.h

Issue 993253003: Modify build_gles2_cmd_buffer.py to generate a class that implements gpu::GLES2Interace and for eac… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « mojo/cc/DEPS ('k') | mojo/cc/context_provider_mojo.cc » ('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 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 MOJO_CC_CONTEXT_PROVIDER_MOJO_H_ 5 #ifndef MOJO_CC_CONTEXT_PROVIDER_MOJO_H_
6 #define MOJO_CC_CONTEXT_PROVIDER_MOJO_H_ 6 #define MOJO_CC_CONTEXT_PROVIDER_MOJO_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
9 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
10 #include "cc/output/context_provider.h" 11 #include "cc/output/context_provider.h"
11 #include "third_party/mojo/src/mojo/public/c/gles2/gles2.h" 12 #include "third_party/mojo/src/mojo/public/c/gles2/gles2.h"
12 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" 13 #include "third_party/mojo/src/mojo/public/cpp/system/core.h"
13 14
14 namespace mojo { 15 namespace mojo {
15 16
16 class ContextProviderMojo : public cc::ContextProvider { 17 class ContextProviderMojo : public cc::ContextProvider {
17 public: 18 public:
18 explicit ContextProviderMojo(ScopedMessagePipeHandle command_buffer_handle); 19 explicit ContextProviderMojo(ScopedMessagePipeHandle command_buffer_handle);
(...skipping 22 matching lines...) Expand all
41 42
42 private: 43 private:
43 static void ContextLostThunk(void* closure) { 44 static void ContextLostThunk(void* closure) {
44 static_cast<ContextProviderMojo*>(closure)->ContextLost(); 45 static_cast<ContextProviderMojo*>(closure)->ContextLost();
45 } 46 }
46 void ContextLost(); 47 void ContextLost();
47 48
48 cc::ContextProvider::Capabilities capabilities_; 49 cc::ContextProvider::Capabilities capabilities_;
49 ScopedMessagePipeHandle command_buffer_handle_; 50 ScopedMessagePipeHandle command_buffer_handle_;
50 MojoGLES2Context context_; 51 MojoGLES2Context context_;
52 scoped_ptr<gpu::gles2::GLES2Interface> context_gl_;
51 bool context_lost_; 53 bool context_lost_;
52 54
53 base::Lock context_lock_; 55 base::Lock context_lock_;
54 56
55 DISALLOW_COPY_AND_ASSIGN(ContextProviderMojo); 57 DISALLOW_COPY_AND_ASSIGN(ContextProviderMojo);
56 }; 58 };
57 59
58 } // namespace mojo 60 } // namespace mojo
59 61
60 #endif // MOJO_CC_CONTEXT_PROVIDER_MOJO_H_ 62 #endif // MOJO_CC_CONTEXT_PROVIDER_MOJO_H_
OLDNEW
« no previous file with comments | « mojo/cc/DEPS ('k') | mojo/cc/context_provider_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698