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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 9562009: Don't trigger accelerated compositing for 3D CSS when using SwiftShader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « 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/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) 424 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)
425 prefs.accelerated_compositing_enabled = false; 425 prefs.accelerated_compositing_enabled = false;
426 if (blacklist_type & content::GPU_FEATURE_TYPE_WEBGL) 426 if (blacklist_type & content::GPU_FEATURE_TYPE_WEBGL)
427 prefs.experimental_webgl_enabled = false; 427 prefs.experimental_webgl_enabled = false;
428 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) 428 if (blacklist_type & content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)
429 prefs.accelerated_2d_canvas_enabled = false; 429 prefs.accelerated_2d_canvas_enabled = false;
430 if (blacklist_type & content::GPU_FEATURE_TYPE_MULTISAMPLING) 430 if (blacklist_type & content::GPU_FEATURE_TYPE_MULTISAMPLING)
431 prefs.gl_multisampling_enabled = false; 431 prefs.gl_multisampling_enabled = false;
432 432
433 // Accelerated video and animation are slower than regular when using a 433 // Accelerated video and animation are slower than regular when using a
434 // software 3d rasterizer. 434 // software 3d rasterizer. 3D CSS may also be too slow to be worthwhile.
435 if (gpu_data_manager->ShouldUseSoftwareRendering()) { 435 if (gpu_data_manager->ShouldUseSoftwareRendering()) {
436 prefs.accelerated_video_enabled = false; 436 prefs.accelerated_video_enabled = false;
437 prefs.accelerated_animation_enabled = false; 437 prefs.accelerated_animation_enabled = false;
438 prefs.accelerated_layers_enabled = false;
438 } 439 }
439 } 440 }
440 441
441 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( 442 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
442 rvh->process()->GetID())) { 443 rvh->process()->GetID())) {
443 prefs.loads_images_automatically = true; 444 prefs.loads_images_automatically = true;
444 prefs.javascript_enabled = true; 445 prefs.javascript_enabled = true;
445 } 446 }
446 447
447 prefs.is_online = !net::NetworkChangeNotifier::IsOffline(); 448 prefs.is_online = !net::NetworkChangeNotifier::IsOffline();
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 save_info, 2472 save_info,
2472 this); 2473 this);
2473 } 2474 }
2474 2475
2475 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2476 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2476 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2477 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2477 // Can be NULL during tests. 2478 // Can be NULL during tests.
2478 if (rwh_view) 2479 if (rwh_view)
2479 rwh_view->SetSize(GetView()->GetContainerSize()); 2480 rwh_view->SetSize(GetView()->GetContainerSize());
2480 } 2481 }
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