OLD | NEW |
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 #include "ui/compositor/test/in_process_context_factory.h" | 5 #include "ui/compositor/test/in_process_context_factory.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "ui/gl/gl_surface.h" | 25 #include "ui/gl/gl_surface.h" |
26 | 26 |
27 namespace ui { | 27 namespace ui { |
28 namespace { | 28 namespace { |
29 | 29 |
30 class FakeReflector : public Reflector { | 30 class FakeReflector : public Reflector { |
31 public: | 31 public: |
32 FakeReflector() {} | 32 FakeReflector() {} |
33 ~FakeReflector() override {} | 33 ~FakeReflector() override {} |
34 void OnMirroringCompositorResized() override {} | 34 void OnMirroringCompositorResized() override {} |
| 35 void AddMirroringLayer(Layer* layer) override {} |
| 36 void RemoveMirroringLayer(Layer* layer) override {} |
35 }; | 37 }; |
36 | 38 |
37 // An OutputSurface implementation that directly draws and swaps to an actual | 39 // An OutputSurface implementation that directly draws and swaps to an actual |
38 // GL surface. | 40 // GL surface. |
39 class DirectOutputSurface : public cc::OutputSurface { | 41 class DirectOutputSurface : public cc::OutputSurface { |
40 public: | 42 public: |
41 explicit DirectOutputSurface( | 43 explicit DirectOutputSurface( |
42 const scoped_refptr<cc::ContextProvider>& context_provider) | 44 const scoped_refptr<cc::ContextProvider>& context_provider) |
43 : cc::OutputSurface(context_provider), weak_ptr_factory_(this) {} | 45 : cc::OutputSurface(context_provider), weak_ptr_factory_(this) {} |
44 | 46 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } | 201 } |
200 | 202 |
201 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, | 203 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, |
202 const gfx::Size& size) { | 204 const gfx::Size& size) { |
203 if (!per_compositor_data_.count(compositor)) | 205 if (!per_compositor_data_.count(compositor)) |
204 return; | 206 return; |
205 per_compositor_data_[compositor]->display()->Resize(size); | 207 per_compositor_data_[compositor]->display()->Resize(size); |
206 } | 208 } |
207 | 209 |
208 } // namespace ui | 210 } // namespace ui |
OLD | NEW |