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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2758733003: Enable --prefer-compositing-to-lcd-text on Chrome OS by default. (Closed)
Patch Set: ChromeOS -> Chrome OS Created 3 years, 9 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 | no next file » | 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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 return WindowOpenDisposition::NEW_POPUP; 322 return WindowOpenDisposition::NEW_POPUP;
323 default: 323 default:
324 NOTREACHED() << "Unexpected WebNavigationPolicy"; 324 NOTREACHED() << "Unexpected WebNavigationPolicy";
325 return WindowOpenDisposition::IGNORE_ACTION; 325 return WindowOpenDisposition::IGNORE_ACTION;
326 } 326 }
327 } 327 }
328 328
329 // Returns true if the device scale is high enough that losing subpixel 329 // Returns true if the device scale is high enough that losing subpixel
330 // antialiasing won't have a noticeable effect on text quality. 330 // antialiasing won't have a noticeable effect on text quality.
331 static bool DeviceScaleEnsuresTextQuality(float device_scale_factor) { 331 static bool DeviceScaleEnsuresTextQuality(float device_scale_factor) {
332 #if defined(OS_ANDROID) 332 #if defined(OS_ANDROID) || defined(OS_CHROMEOS)
333 // On Android, we never have subpixel antialiasing. 333 // On Android, we never have subpixel antialiasing. On Chrome OS we prefer to
334 // composite all scrollers so that we get animated overlay scrollbars.
334 return true; 335 return true;
335 #else 336 #else
336 // 1.5 is a common touchscreen tablet device scale factor. For such 337 // 1.5 is a common touchscreen tablet device scale factor. For such
337 // devices main thread antialiasing is a heavy burden. 338 // devices main thread antialiasing is a heavy burden.
338 return device_scale_factor >= 1.5f; 339 return device_scale_factor >= 1.5f;
339 #endif 340 #endif
340 } 341 }
341 342
342 static bool PreferCompositingToLCDText(CompositorDependencies* compositor_deps, 343 static bool PreferCompositingToLCDText(CompositorDependencies* compositor_deps,
343 float device_scale_factor) { 344 float device_scale_factor) {
(...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2713 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2713 } 2714 }
2714 2715
2715 std::unique_ptr<InputEventAck> ack( 2716 std::unique_ptr<InputEventAck> ack(
2716 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), 2717 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(),
2717 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2718 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2718 OnInputEventAck(std::move(ack)); 2719 OnInputEventAck(std::move(ack));
2719 } 2720 }
2720 2721
2721 } // namespace content 2722 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698