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

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

Issue 10310067: Remove ui-enable-dip option (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 7 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 | « ui/aura/root_window.cc ('k') | ui/compositor/compositor_switches.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/threading/thread_restrictions.h" 8 #include "base/threading/thread_restrictions.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFloatPoin t.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFloatPoin t.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 236
237 void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) { 237 void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) {
238 DCHECK(scale > 0); 238 DCHECK(scale > 0);
239 if (size_in_pixel.IsEmpty() || scale <= 0) 239 if (size_in_pixel.IsEmpty() || scale <= 0)
240 return; 240 return;
241 size_ = size_in_pixel; 241 size_ = size_in_pixel;
242 host_.setViewportSize(size_in_pixel); 242 host_.setViewportSize(size_in_pixel);
243 root_web_layer_.setBounds(size_in_pixel); 243 root_web_layer_.setBounds(size_in_pixel);
244 244
245 if (device_scale_factor_ != scale && IsDIPEnabled()) { 245 if (device_scale_factor_ != scale) {
246 device_scale_factor_ = scale; 246 device_scale_factor_ = scale;
247 if (root_layer_) 247 if (root_layer_)
248 root_layer_->OnDeviceScaleFactorChanged(scale); 248 root_layer_->OnDeviceScaleFactorChanged(scale);
249 } 249 }
250 } 250 }
251 251
252 void Compositor::AddObserver(CompositorObserver* observer) { 252 void Compositor::AddObserver(CompositorObserver* observer) {
253 observer_list_.AddObserver(observer); 253 observer_list_.AddObserver(observer);
254 } 254 }
255 255
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 COMPOSITOR_EXPORT void DisableTestCompositor() { 357 COMPOSITOR_EXPORT void DisableTestCompositor() {
358 test_compositor_enabled = false; 358 test_compositor_enabled = false;
359 } 359 }
360 360
361 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 361 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
362 return test_compositor_enabled; 362 return test_compositor_enabled;
363 } 363 }
364 364
365 } // namespace ui 365 } // namespace ui
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698