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

Side by Side Diff: services/ui/public/cpp/gles2_context.h

Issue 2189893002: services/ui: Create a proper component for the client-lib. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 | « services/ui/public/cpp/context_provider.h ('k') | services/ui/public/cpp/input_event_handler.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 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 SERVICES_UI_PUBLIC_CPP_GLES2_CONTEXT_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_GLES2_CONTEXT_H_
6 #define SERVICES_UI_PUBLIC_CPP_GLES2_CONTEXT_H_ 6 #define SERVICES_UI_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 "gpu/command_buffer/client/gles2_implementation.h" 14 #include "gpu/command_buffer/client/gles2_implementation.h"
15 #include "services/ui/public/cpp/ui_export.h"
15 #include "services/ui/public/interfaces/command_buffer.mojom.h" 16 #include "services/ui/public/interfaces/command_buffer.mojom.h"
16 17
17 namespace gpu { 18 namespace gpu {
18 class CommandBufferProxyImpl; 19 class CommandBufferProxyImpl;
19 class TransferBuffer; 20 class TransferBuffer;
20 namespace gles2 { 21 namespace gles2 {
21 class GLES2CmdHelper; 22 class GLES2CmdHelper;
22 } 23 }
23 } 24 }
24 25
25 namespace ui { 26 namespace ui {
26 27
27 class CommandBufferClientImpl; 28 class CommandBufferClientImpl;
28 29
29 class GLES2Context { 30 class UI_EXPORT GLES2Context {
30 public: 31 public:
31 ~GLES2Context(); 32 ~GLES2Context();
32 gpu::gles2::GLES2Interface* interface() const { 33 gpu::gles2::GLES2Interface* interface() const {
33 return implementation_.get(); 34 return implementation_.get();
34 } 35 }
35 gpu::ContextSupport* context_support() const { return implementation_.get(); } 36 gpu::ContextSupport* context_support() const { return implementation_.get(); }
36 37
37 static std::unique_ptr<GLES2Context> CreateOffscreenContext( 38 static std::unique_ptr<GLES2Context> CreateOffscreenContext(
38 const std::vector<int32_t>& attribs); 39 const std::vector<int32_t>& attribs);
39 40
40 private: 41 private:
41 GLES2Context(); 42 GLES2Context();
42 bool Initialize(const std::vector<int32_t>& attribs); 43 bool Initialize(const std::vector<int32_t>& attribs);
43 44
44 std::unique_ptr<CommandBufferClientImpl> command_buffer_client_impl_; 45 std::unique_ptr<CommandBufferClientImpl> command_buffer_client_impl_;
45 std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_proxy_impl_; 46 std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_proxy_impl_;
46 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; 47 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
47 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; 48 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
48 std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_; 49 std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_;
49 50
50 DISALLOW_COPY_AND_ASSIGN(GLES2Context); 51 DISALLOW_COPY_AND_ASSIGN(GLES2Context);
51 }; 52 };
52 53
53 } // namespace ui 54 } // namespace ui
54 55
55 #endif // SERVICES_UI_PUBLIC_CPP_GLES2_CONTEXT_H_ 56 #endif // SERVICES_UI_PUBLIC_CPP_GLES2_CONTEXT_H_
OLDNEW
« no previous file with comments | « services/ui/public/cpp/context_provider.h ('k') | services/ui/public/cpp/input_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698