OLD | NEW |
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 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 #endif | 398 #endif |
399 | 399 |
400 } | 400 } |
401 | 401 |
402 static bool PreferCompositingToLCDText(float device_scale_factor) { | 402 static bool PreferCompositingToLCDText(float device_scale_factor) { |
403 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 403 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
404 if (command_line.HasSwitch(switches::kDisablePreferCompositingToLCDText)) | 404 if (command_line.HasSwitch(switches::kDisablePreferCompositingToLCDText)) |
405 return false; | 405 return false; |
406 if (command_line.HasSwitch(switches::kEnablePreferCompositingToLCDText)) | 406 if (command_line.HasSwitch(switches::kEnablePreferCompositingToLCDText)) |
407 return true; | 407 return true; |
| 408 if (RenderThreadImpl::current() && |
| 409 !RenderThreadImpl::current()->is_lcd_text_enabled()) |
| 410 return true; |
408 return DeviceScaleEnsuresTextQuality(device_scale_factor); | 411 return DeviceScaleEnsuresTextQuality(device_scale_factor); |
409 } | 412 } |
410 | 413 |
411 static bool ShouldUseAcceleratedCompositingForOverflowScroll( | 414 static bool ShouldUseAcceleratedCompositingForOverflowScroll( |
412 float device_scale_factor) { | 415 float device_scale_factor) { |
413 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 416 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
414 | 417 |
415 if (command_line.HasSwitch(switches::kDisableAcceleratedOverflowScroll)) | 418 if (command_line.HasSwitch(switches::kDisableAcceleratedOverflowScroll)) |
416 return false; | 419 return false; |
417 | 420 |
(...skipping 3914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4332 std::vector<gfx::Size> sizes; | 4335 std::vector<gfx::Size> sizes; |
4333 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4336 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4334 if (!url.isEmpty()) | 4337 if (!url.isEmpty()) |
4335 urls.push_back( | 4338 urls.push_back( |
4336 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4339 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4337 } | 4340 } |
4338 SendUpdateFaviconURL(urls); | 4341 SendUpdateFaviconURL(urls); |
4339 } | 4342 } |
4340 | 4343 |
4341 } // namespace content | 4344 } // namespace content |
OLD | NEW |