Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / components / view_manager / gles2 / gpu_impl.h
blobf9c100c5a53ca75cb7ac204159051ef4ea75f8bb
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_VIEW_MANAGER_GLES2_GPU_IMPL_H_
6 #define COMPONENTS_VIEW_MANAGER_GLES2_GPU_IMPL_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/threading/thread.h"
11 #include "components/view_manager/gles2/gpu_state.h"
12 #include "components/view_manager/public/interfaces/command_buffer.mojom.h"
13 #include "components/view_manager/public/interfaces/gpu.mojom.h"
14 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
15 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
16 #include "ui/mojo/geometry/geometry.mojom.h"
18 namespace gles2 {
20 class GpuImpl : public mojo::Gpu {
21 public:
22 GpuImpl(mojo::InterfaceRequest<mojo::Gpu> request,
23 const scoped_refptr<GpuState>& state);
24 ~GpuImpl() override;
26 private:
27 void CreateOffscreenGLES2Context(mojo::InterfaceRequest<mojo::CommandBuffer>
28 command_buffer_request) override;
30 mojo::StrongBinding<Gpu> binding_;
31 scoped_refptr<GpuState> state_;
33 DISALLOW_COPY_AND_ASSIGN(GpuImpl);
36 } // namespace gles2
38 #endif // COMPONENTS_VIEW_MANAGER_GLES2_GPU_IMPL_H_