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

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

Issue 1373033004: aura: Defer OutputSurface creation until widget is available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test_compositor_host.h" 5 #include "ui/compositor/test/test_compositor_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 TestCompositorHostOzone::~TestCompositorHostOzone() {} 46 TestCompositorHostOzone::~TestCompositorHostOzone() {}
47 47
48 void TestCompositorHostOzone::Show() { 48 void TestCompositorHostOzone::Show() {
49 // Ozone should rightly have a backing native framebuffer 49 // Ozone should rightly have a backing native framebuffer
50 // An in-memory array draw into by OSMesa is a reasonble 50 // An in-memory array draw into by OSMesa is a reasonble
51 // fascimile of a dumb framebuffer at present. 51 // fascimile of a dumb framebuffer at present.
52 // GLSurface will allocate the array so long as it is provided 52 // GLSurface will allocate the array so long as it is provided
53 // with a non-0 widget. 53 // with a non-0 widget.
54 // TODO(rjkroege): Use a "real" ozone widget when it is 54 // TODO(rjkroege): Use a "real" ozone widget when it is
55 // available: http://crbug.com/255128 55 // available: http://crbug.com/255128
56 compositor_.SetAcceleratedWidgetAndStartCompositor(1); 56 compositor_.SetAcceleratedWidget(1);
57 compositor_.SetScaleAndSize(1.0f, bounds_.size()); 57 compositor_.SetScaleAndSize(1.0f, bounds_.size());
58 } 58 }
59 59
60 ui::Compositor* TestCompositorHostOzone::GetCompositor() { 60 ui::Compositor* TestCompositorHostOzone::GetCompositor() {
61 return &compositor_; 61 return &compositor_;
62 } 62 }
63 63
64 // static 64 // static
65 TestCompositorHost* TestCompositorHost::Create( 65 TestCompositorHost* TestCompositorHost::Create(
66 const gfx::Rect& bounds, 66 const gfx::Rect& bounds,
67 ui::ContextFactory* context_factory) { 67 ui::ContextFactory* context_factory) {
68 return new TestCompositorHostOzone(bounds, context_factory); 68 return new TestCompositorHostOzone(bounds, context_factory);
69 } 69 }
70 70
71 } // namespace ui 71 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_compositor_host_mac.mm ('k') | ui/compositor/test/test_compositor_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698