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 #include "mandoline/ui/aura/surface_binding.h" | 5 #include "mandoline/ui/aura/surface_binding.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/threading/thread_local.h" | 11 #include "base/threading/thread_local.h" |
12 #include "cc/output/compositor_frame.h" | 12 #include "cc/output/compositor_frame.h" |
13 #include "cc/output/output_surface.h" | 13 #include "cc/output/output_surface.h" |
14 #include "cc/output/output_surface_client.h" | 14 #include "cc/output/output_surface_client.h" |
15 #include "cc/output/software_output_device.h" | 15 #include "cc/output/software_output_device.h" |
16 #include "cc/resources/shared_bitmap_manager.h" | 16 #include "cc/resources/shared_bitmap_manager.h" |
17 #include "components/view_manager/public/cpp/view.h" | 17 #include "components/view_manager/public/cpp/view.h" |
18 #include "components/view_manager/public/cpp/view_manager.h" | 18 #include "components/view_manager/public/cpp/view_manager.h" |
19 #include "components/view_manager/public/interfaces/gpu.mojom.h" | 19 #include "components/view_manager/public/interfaces/gpu.mojom.h" |
20 #include "components/view_manager/public/interfaces/surfaces.mojom.h" | 20 #include "components/view_manager/public/interfaces/surfaces.mojom.h" |
21 #include "mandoline/ui/aura/window_tree_host_mojo.h" | 21 #include "mandoline/ui/aura/window_tree_host_mojo.h" |
22 #include "mojo/application/public/cpp/connect.h" | 22 #include "mojo/application/public/cpp/connect.h" |
23 #include "mojo/application/public/interfaces/shell.mojom.h" | 23 #include "mojo/application/public/interfaces/shell.mojom.h" |
24 #include "mojo/cc/context_provider_mojo.h" | 24 #include "mojo/cc/context_provider_mojo.h" |
25 #include "mojo/converters/geometry/geometry_type_converters.h" | 25 #include "mojo/converters/geometry/geometry_type_converters.h" |
26 #include "mojo/converters/surfaces/surfaces_type_converters.h" | 26 #include "mojo/converters/surfaces/surfaces_type_converters.h" |
27 #include "mojo/public/cpp/bindings/binding.h" | |
28 | 27 |
29 namespace mandoline { | 28 namespace mandoline { |
30 namespace { | 29 namespace { |
31 | 30 |
32 // OutputSurface --------------------------------------------------------------- | 31 // OutputSurface --------------------------------------------------------------- |
33 | 32 |
34 // OutputSurface implementation for a view. Pushes the surface id to View when | 33 // OutputSurface implementation for a view. Pushes the surface id to View when |
35 // appropriate. | 34 // appropriate. |
36 class OutputSurfaceImpl : public cc::OutputSurface { | 35 class OutputSurfaceImpl : public cc::OutputSurface { |
37 public: | 36 public: |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 252 } |
254 | 253 |
255 SurfaceBinding::~SurfaceBinding() { | 254 SurfaceBinding::~SurfaceBinding() { |
256 } | 255 } |
257 | 256 |
258 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { | 257 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { |
259 return state_->CreateOutputSurface(view_); | 258 return state_->CreateOutputSurface(view_); |
260 } | 259 } |
261 | 260 |
262 } // namespace mandoline | 261 } // namespace mandoline |
OLD | NEW |