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

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: Add null check to render_view_impl.cc 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
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/test/gpu/gpu_tests/gpu_rasterization.py » ('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 "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() &&
465 !RenderThreadImpl::current()->is_lcd_text_enabled())
465 return true; 466 return true;
466 467
467 return DeviceScaleEnsuresTextQuality(device_scale_factor); 468 return DeviceScaleEnsuresTextQuality(device_scale_factor);
468 } 469 }
469 470
470 static bool ShouldUseCompositedScrollingForFrames( 471 static bool ShouldUseCompositedScrollingForFrames(
471 float device_scale_factor) { 472 float device_scale_factor) {
472 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 473 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
473 474
474 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames)) 475 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames))
475 return false; 476 return false;
476 477
477 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames)) 478 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames))
478 return true; 479 return true;
479 480
480 if (!cc::switches::IsLCDTextEnabled()) 481 if (RenderThreadImpl::current() &&
482 !RenderThreadImpl::current()->is_lcd_text_enabled())
481 return true; 483 return true;
482 484
483 return DeviceScaleEnsuresTextQuality(device_scale_factor); 485 return DeviceScaleEnsuresTextQuality(device_scale_factor);
484 } 486 }
485 487
486 static bool ShouldUseUniversalAcceleratedCompositingForOverflowScroll() { 488 static bool ShouldUseUniversalAcceleratedCompositingForOverflowScroll() {
487 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 489 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
488 490
489 if (command_line.HasSwitch( 491 if (command_line.HasSwitch(
490 switches::kDisableUniversalAcceleratedOverflowScroll)) 492 switches::kDisableUniversalAcceleratedOverflowScroll))
(...skipping 4666 matching lines...) Expand 10 before | Expand all | Expand 10 after
5157 for (size_t i = 0; i < icon_urls.size(); i++) { 5159 for (size_t i = 0; i < icon_urls.size(); i++) {
5158 WebURL url = icon_urls[i].iconURL(); 5160 WebURL url = icon_urls[i].iconURL();
5159 if (!url.isEmpty()) 5161 if (!url.isEmpty())
5160 urls.push_back(FaviconURL(url, 5162 urls.push_back(FaviconURL(url,
5161 ToFaviconType(icon_urls[i].iconType()))); 5163 ToFaviconType(icon_urls[i].iconType())));
5162 } 5164 }
5163 SendUpdateFaviconURL(urls); 5165 SendUpdateFaviconURL(urls);
5164 } 5166 }
5165 5167
5166 } // namespace content 5168 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/test/gpu/gpu_tests/gpu_rasterization.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698