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

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

Issue 23444051: Move the content-dependent RecreateLayer logic from aura::Window to RWHVA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better comments Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/drag_drop/drag_drop_controller.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 9
10 // Xlib.h defines RootWindow. 10 // Xlib.h defines RootWindow.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 float device_scale_factor) OVERRIDE { 109 float device_scale_factor) OVERRIDE {
110 } 110 }
111 virtual void OnWindowDestroying() OVERRIDE {} 111 virtual void OnWindowDestroying() OVERRIDE {}
112 virtual void OnWindowDestroyed() OVERRIDE {} 112 virtual void OnWindowDestroyed() OVERRIDE {}
113 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE { 113 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE {
114 } 114 }
115 virtual bool HasHitTestMask() const OVERRIDE { 115 virtual bool HasHitTestMask() const OVERRIDE {
116 return false; 116 return false;
117 } 117 }
118 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {} 118 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {}
119 virtual scoped_refptr<ui::Texture> CopyTexture() OVERRIDE { 119 virtual void DidRecreateLayer(ui::Layer* old_layer,
120 NOTREACHED(); 120 ui::Layer* new_layer) OVERRIDE {}
121 return scoped_refptr<ui::Texture>();
122 }
123 121
124 // Set the cursor image for the |display|'s scale factor. Note that 122 // Set the cursor image for the |display|'s scale factor. Note that
125 // mirror window's scale factor is always 1.0f, therefore we need to 123 // mirror window's scale factor is always 1.0f, therefore we need to
126 // take 2x's image and paint as if it's 1x image. 124 // take 2x's image and paint as if it's 1x image.
127 void SetCursorImage(const gfx::ImageSkia& image, 125 void SetCursorImage(const gfx::ImageSkia& image,
128 const gfx::Display& display) { 126 const gfx::Display& display) {
129 device_scale_factor_ = 127 device_scale_factor_ =
130 ui::GetScaleFactorFromScale(display.device_scale_factor()); 128 ui::GetScaleFactorFromScale(display.device_scale_factor());
131 const gfx::ImageSkiaRep& image_rep = 129 const gfx::ImageSkiaRep& image_rep =
132 image.GetRepresentation(device_scale_factor_); 130 image.GetRepresentation(device_scale_factor_);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 Shell::GetScreen()->GetPrimaryDisplay().id()); 333 Shell::GetScreen()->GetPrimaryDisplay().id());
336 DCHECK(display_manager->mirrored_display().is_valid()); 334 DCHECK(display_manager->mirrored_display().is_valid());
337 return scoped_ptr<aura::RootWindowTransformer>( 335 return scoped_ptr<aura::RootWindowTransformer>(
338 internal::CreateRootWindowTransformerForMirroredDisplay( 336 internal::CreateRootWindowTransformerForMirroredDisplay(
339 source_display_info, 337 source_display_info,
340 mirror_display_info)); 338 mirror_display_info));
341 } 339 }
342 340
343 } // namespace internal 341 } // namespace internal
344 } // namespace ash 342 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/drag_drop/drag_drop_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698