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

Side by Side Diff: components/mus/public/cpp/gles2_context.h

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 6 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_MUS_PUBLIC_CPP_GLES2_CONTEXT_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_GLES2_CONTEXT_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_GLES2_CONTEXT_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_GLES2_CONTEXT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "components/mus/public/cpp/lib/command_buffer_client_impl.h" 14 #include "components/mus/public/cpp/mus_public_export.h"
15 #include "gpu/command_buffer/client/gles2_implementation.h" 15 #include "gpu/command_buffer/client/gles2_implementation.h"
16 #include "mojo/public/cpp/system/core.h"
16 17
17 namespace gpu { 18 namespace gpu {
19 class CommandBufferProxyImpl;
18 class TransferBuffer; 20 class TransferBuffer;
19 namespace gles2 { 21 namespace gles2 {
20 class GLES2CmdHelper; 22 class GLES2CmdHelper;
21 class GLES2Implementation;
22 } 23 }
23 } 24 }
24 25
25 namespace mus { 26 namespace mus {
26 27
27 class GLES2Context { 28 class CommandBufferClientImpl;
29
30 class MUS_PUBLIC_EXPORT GLES2Context {
28 public: 31 public:
29 explicit GLES2Context(const std::vector<int32_t>& attribs, 32 GLES2Context(const std::vector<int32_t>& attribs,
30 mojo::ScopedMessagePipeHandle command_buffer_handle); 33 mojo::ScopedMessagePipeHandle command_buffer_handle);
31 virtual ~GLES2Context(); 34 virtual ~GLES2Context();
32 bool Initialize(); 35 bool Initialize();
33 36
34 gpu::gles2::GLES2Interface* interface() const { 37 gpu::gles2::GLES2Interface* interface() const {
35 return implementation_.get(); 38 return implementation_.get();
36 } 39 }
37 gpu::ContextSupport* context_support() const { return implementation_.get(); } 40 gpu::ContextSupport* context_support() const { return implementation_.get(); }
38 41
39 private: 42 private:
40 CommandBufferClientImpl command_buffer_; 43 std::unique_ptr<CommandBufferClientImpl> command_buffer_client_impl_;
44 std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_proxy_impl_;
41 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; 45 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
42 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; 46 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
43 std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_; 47 std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_;
44 48
45 DISALLOW_COPY_AND_ASSIGN(GLES2Context); 49 DISALLOW_COPY_AND_ASSIGN(GLES2Context);
46 }; 50 };
47 51
48 } // namespace mus 52 } // namespace mus
49 53
50 #endif // COMPONENTS_MUS_PUBLIC_CPP_GLES2_CONTEXT_H_ 54 #endif // COMPONENTS_MUS_PUBLIC_CPP_GLES2_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698