OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_GFX_COMPOSITOR_BACKEND_GPU_RASTERIZER_H_ | 5 #ifndef SERVICES_GFX_COMPOSITOR_BACKEND_GPU_RASTERIZER_H_ |
6 #define SERVICES_GFX_COMPOSITOR_BACKEND_GPU_RASTERIZER_H_ | 6 #define SERVICES_GFX_COMPOSITOR_BACKEND_GPU_RASTERIZER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 void SubmitFrame(const std::shared_ptr<RenderFrame>& frame); | 39 void SubmitFrame(const std::shared_ptr<RenderFrame>& frame); |
40 | 40 |
41 private: | 41 private: |
42 // |ViewportParameterListener|: | 42 // |ViewportParameterListener|: |
43 void OnVSyncParametersUpdated(int64_t timebase, int64_t interval) override; | 43 void OnVSyncParametersUpdated(int64_t timebase, int64_t interval) override; |
44 | 44 |
45 // |GLContext::Observer|: | 45 // |GLContext::Observer|: |
46 void OnContextLost() override; | 46 void OnContextLost() override; |
47 | 47 |
48 void CreateContext(); | 48 void CreateContext(); |
49 void InitContext(mojo::CommandBufferPtr command_buffer); | 49 void InitContext(mojo::InterfaceHandle<mojo::CommandBuffer> command_buffer); |
50 void DestroyContext(); | 50 void DestroyContext(); |
51 void OnContextProviderConnectionError(); | 51 void OnContextProviderConnectionError(); |
52 | 52 |
53 void Draw(); | 53 void Draw(); |
54 | 54 |
55 void PostErrorCallback(); | 55 void PostErrorCallback(); |
56 | 56 |
57 mojo::ContextProviderPtr context_provider_; | 57 mojo::ContextProviderPtr context_provider_; |
58 std::shared_ptr<VsyncScheduler> scheduler_; | 58 std::shared_ptr<VsyncScheduler> scheduler_; |
59 scoped_refptr<base::TaskRunner> task_runner_; | 59 scoped_refptr<base::TaskRunner> task_runner_; |
60 base::Closure error_callback_; | 60 base::Closure error_callback_; |
61 | 61 |
62 base::WeakPtr<mojo::GLContext> gl_context_; | 62 base::WeakPtr<mojo::GLContext> gl_context_; |
63 std::unique_ptr<mojo::skia::GaneshContext> ganesh_context_; | 63 std::unique_ptr<mojo::skia::GaneshContext> ganesh_context_; |
64 std::unique_ptr<mojo::skia::GaneshFramebufferSurface> ganesh_surface_; | 64 std::unique_ptr<mojo::skia::GaneshFramebufferSurface> ganesh_surface_; |
65 | 65 |
66 std::shared_ptr<RenderFrame> current_frame_; | 66 std::shared_ptr<RenderFrame> current_frame_; |
67 | 67 |
68 mojo::Binding<ViewportParameterListener> viewport_parameter_listener_binding_; | 68 mojo::Binding<ViewportParameterListener> viewport_parameter_listener_binding_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer); | 70 DISALLOW_COPY_AND_ASSIGN(GpuRasterizer); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace compositor | 73 } // namespace compositor |
74 | 74 |
75 #endif // SERVICES_GFX_COMPOSITOR_BACKEND_GPU_RASTERIZER_H_ | 75 #endif // SERVICES_GFX_COMPOSITOR_BACKEND_GPU_RASTERIZER_H_ |
OLD | NEW |