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

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

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

Powered by Google App Engine
This is Rietveld 408576698