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

Side by Side Diff: ash/display/mirror_window_controller.cc

Issue 634113002: Use solid color layer for delegated surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | content/browser/compositor/delegated_frame_host.cc » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "ash/display/mirror_window_controller.h" 5 #include "ash/display/mirror_window_controller.h"
6 6
7 #if defined(USE_X11) 7 #if defined(USE_X11)
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 host->InitHost(); 106 host->InitHost();
107 #if defined(USE_X11) 107 #if defined(USE_X11)
108 DisableInput(host->GetAcceleratedWidget()); 108 DisableInput(host->GetAcceleratedWidget());
109 #endif 109 #endif
110 110
111 aura::client::SetCaptureClient(host->window(), new NoneCaptureClient()); 111 aura::client::SetCaptureClient(host->window(), new NoneCaptureClient());
112 host->Show(); 112 host->Show();
113 113
114 // TODO(oshima): Start mirroring. 114 // TODO(oshima): Start mirroring.
115 aura::Window* mirror_window = new aura::Window(NULL); 115 aura::Window* mirror_window = new aura::Window(NULL);
116 mirror_window->Init(aura::WINDOW_LAYER_TEXTURED); 116 mirror_window->Init(aura::WINDOW_LAYER_SOLID_COLOR);
sky 2014/10/10 02:42:57 Why is solid color right here?
117 host->window()->AddChild(mirror_window); 117 host->window()->AddChild(mirror_window);
118 mirror_window->SetBounds(host->window()->bounds()); 118 mirror_window->SetBounds(host->window()->bounds());
119 mirror_window->Show(); 119 mirror_window->Show();
120 reflector_ = aura::Env::GetInstance()->context_factory()->CreateReflector( 120 reflector_ = aura::Env::GetInstance()->context_factory()->CreateReflector(
121 Shell::GetPrimaryRootWindow()->GetHost()->compositor(), 121 Shell::GetPrimaryRootWindow()->GetHost()->compositor(),
122 mirror_window->layer()); 122 mirror_window->layer());
123 } else { 123 } else {
124 aura::WindowTreeHost* host = ash_host_->AsWindowTreeHost(); 124 aura::WindowTreeHost* host = ash_host_->AsWindowTreeHost();
125 GetRootWindowSettings(host->window())->display_id = display_info.id(); 125 GetRootWindowSettings(host->window())->display_id = display_info.id();
126 host->SetBounds(display_info.bounds_in_native()); 126 host->SetBounds(display_info.bounds_in_native());
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 display_manager->mirrored_display_id()); 182 display_manager->mirrored_display_id());
183 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( 183 const DisplayInfo& source_display_info = display_manager->GetDisplayInfo(
184 Shell::GetScreen()->GetPrimaryDisplay().id()); 184 Shell::GetScreen()->GetPrimaryDisplay().id());
185 DCHECK(display_manager->IsMirrored()); 185 DCHECK(display_manager->IsMirrored());
186 return scoped_ptr<RootWindowTransformer>( 186 return scoped_ptr<RootWindowTransformer>(
187 CreateRootWindowTransformerForMirroredDisplay(source_display_info, 187 CreateRootWindowTransformerForMirroredDisplay(source_display_info,
188 mirror_display_info)); 188 mirror_display_info));
189 } 189 }
190 190
191 } // namespace ash 191 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698