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

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

Issue 189883009: Define a --force-gpu-rasterization flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor logic fix-up Created 6 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 | Annotate | Revision Log
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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 static bool ShouldUseAcceleratedCompositingForScrollableFrames( 454 static bool ShouldUseAcceleratedCompositingForScrollableFrames(
455 float device_scale_factor) { 455 float device_scale_factor) {
456 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 456 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
457 457
458 if (command_line.HasSwitch(switches::kDisableAcceleratedScrollableFrames)) 458 if (command_line.HasSwitch(switches::kDisableAcceleratedScrollableFrames))
459 return false; 459 return false;
460 460
461 if (command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames)) 461 if (command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames))
462 return true; 462 return true;
463 463
464 if (!cc::switches::IsLCDTextEnabled()) 464 if (!RenderThreadImpl::current()->is_lcd_text_enabled())
465 return true; 465 return true;
466 466
467 return DeviceScaleEnsuresTextQuality(device_scale_factor); 467 return DeviceScaleEnsuresTextQuality(device_scale_factor);
468 } 468 }
469 469
470 static bool ShouldUseCompositedScrollingForFrames( 470 static bool ShouldUseCompositedScrollingForFrames(
471 float device_scale_factor) { 471 float device_scale_factor) {
472 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 472 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
473 473
474 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames)) 474 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames))
475 return false; 475 return false;
476 476
477 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames)) 477 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames))
478 return true; 478 return true;
479 479
480 if (!cc::switches::IsLCDTextEnabled()) 480 if (!RenderThreadImpl::current()->is_lcd_text_enabled())
481 return true; 481 return true;
482 482
483 return DeviceScaleEnsuresTextQuality(device_scale_factor); 483 return DeviceScaleEnsuresTextQuality(device_scale_factor);
484 } 484 }
485 485
486 static bool ShouldUseUniversalAcceleratedCompositingForOverflowScroll() { 486 static bool ShouldUseUniversalAcceleratedCompositingForOverflowScroll() {
487 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 487 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
488 488
489 if (command_line.HasSwitch( 489 if (command_line.HasSwitch(
490 switches::kDisableUniversalAcceleratedOverflowScroll)) 490 switches::kDisableUniversalAcceleratedOverflowScroll))
(...skipping 4698 matching lines...) Expand 10 before | Expand all | Expand 10 after
5189 for (size_t i = 0; i < icon_urls.size(); i++) { 5189 for (size_t i = 0; i < icon_urls.size(); i++) {
5190 WebURL url = icon_urls[i].iconURL(); 5190 WebURL url = icon_urls[i].iconURL();
5191 if (!url.isEmpty()) 5191 if (!url.isEmpty())
5192 urls.push_back(FaviconURL(url, 5192 urls.push_back(FaviconURL(url,
5193 ToFaviconType(icon_urls[i].iconType()))); 5193 ToFaviconType(icon_urls[i].iconType())));
5194 } 5194 }
5195 SendUpdateFaviconURL(urls); 5195 SendUpdateFaviconURL(urls);
5196 } 5196 }
5197 5197
5198 } // namespace content 5198 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698