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

Side by Side Diff: ui/compositor/test/test_compositor_host_x11.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
« no previous file with comments | « ui/compositor/test/test_compositor_host_win.cc ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 XMapWindow(display, window_); 69 XMapWindow(display, window_);
70 70
71 while (1) { 71 while (1) {
72 XEvent event; 72 XEvent event;
73 XNextEvent(display, &event); 73 XNextEvent(display, &event);
74 if (event.type == MapNotify && event.xmap.window == window_) 74 if (event.type == MapNotify && event.xmap.window == window_)
75 break; 75 break;
76 } 76 }
77 compositor_.SetAcceleratedWidget(window_); 77 compositor_.SetAcceleratedWidget(window_);
78 compositor_.SetScaleAndSize(1.0f, bounds_.size()); 78 compositor_.SetScaleAndSize(1.0f, bounds_.size());
79 compositor_.SetVisible(true);
79 } 80 }
80 81
81 ui::Compositor* TestCompositorHostX11::GetCompositor() { 82 ui::Compositor* TestCompositorHostX11::GetCompositor() {
82 return &compositor_; 83 return &compositor_;
83 } 84 }
84 85
85 // static 86 // static
86 TestCompositorHost* TestCompositorHost::Create( 87 TestCompositorHost* TestCompositorHost::Create(
87 const gfx::Rect& bounds, 88 const gfx::Rect& bounds,
88 ui::ContextFactory* context_factory) { 89 ui::ContextFactory* context_factory) {
89 return new TestCompositorHostX11(bounds, context_factory); 90 return new TestCompositorHostX11(bounds, context_factory);
90 } 91 }
91 92
92 } // namespace ui 93 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_compositor_host_win.cc ('k') | ui/views/mus/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698