Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 1108713004: OffscreenBrowserCompositorOutputSurface for Unified Desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac build Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/compositor/reflector.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/compositor/reflector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698