| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 BLIMP_CLIENT_APP_COMPOSITOR_BROWSER_COMPOSITOR_H_ | 5 #ifndef BLIMP_CLIENT_APP_COMPOSITOR_BROWSER_COMPOSITOR_H_ |
| 6 #define BLIMP_CLIENT_APP_COMPOSITOR_BROWSER_COMPOSITOR_H_ | 6 #define BLIMP_CLIENT_APP_COMPOSITOR_BROWSER_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "blimp/client/support/compositor/blimp_embedder_compositor.h" | 9 #include "blimp/client/support/compositor/blimp_embedder_compositor.h" |
| 10 #include "gpu/ipc/common/surface_handle.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 11 | 12 |
| 12 namespace blimp { | 13 namespace blimp { |
| 13 namespace client { | 14 namespace client { |
| 14 class CompositorDependencies; | 15 class CompositorDependencies; |
| 15 | 16 |
| 16 // A version of a BlimpEmbedderCompositor that supplies a ContextProvider backed | 17 // A version of a BlimpEmbedderCompositor that supplies a ContextProvider backed |
| 17 // by an AcceleratedWidget. The AcceleratedWidget is a platform specific hook | 18 // by an AcceleratedWidget. The AcceleratedWidget is a platform specific hook |
| 18 // that the ContextProvider can use to render to the screen. | 19 // that the ContextProvider can use to render to the screen. |
| 19 class BrowserCompositor : public BlimpEmbedderCompositor { | 20 class BrowserCompositor : public BlimpEmbedderCompositor { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 30 | 31 |
| 31 // A callback to get notifed when the compositor performs a successful swap. | 32 // A callback to get notifed when the compositor performs a successful swap. |
| 32 void set_did_complete_swap_buffers_callback(base::Closure callback) { | 33 void set_did_complete_swap_buffers_callback(base::Closure callback) { |
| 33 did_complete_swap_buffers_ = callback; | 34 did_complete_swap_buffers_ = callback; |
| 34 } | 35 } |
| 35 | 36 |
| 36 protected: | 37 protected: |
| 37 // BlimpEmbedderCompositor implementation. | 38 // BlimpEmbedderCompositor implementation. |
| 38 void DidReceiveCompositorFrameAck() override; | 39 void DidReceiveCompositorFrameAck() override; |
| 39 | 40 |
| 41 gpu::SurfaceHandle surface_handle_ = gpu::kNullSurfaceHandle; |
| 40 base::Closure did_complete_swap_buffers_; | 42 base::Closure did_complete_swap_buffers_; |
| 41 | 43 |
| 42 private: | 44 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(BrowserCompositor); | 45 DISALLOW_COPY_AND_ASSIGN(BrowserCompositor); |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 } // namespace client | 48 } // namespace client |
| 47 } // namespace blimp | 49 } // namespace blimp |
| 48 | 50 |
| 49 #endif // BLIMP_CLIENT_APP_COMPOSITOR_BROWSER_COMPOSITOR_H_ | 51 #endif // BLIMP_CLIENT_APP_COMPOSITOR_BROWSER_COMPOSITOR_H_ |
| OLD | NEW |