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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 1514743002: cc: turn on strict paint property checking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DragImageView to not resize during paint Created 5 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 const int kMinSlowDownScaleFactor = 0; 365 const int kMinSlowDownScaleFactor = 0;
366 const int kMaxSlowDownScaleFactor = INT_MAX; 366 const int kMaxSlowDownScaleFactor = INT_MAX;
367 GetSwitchValueAsInt( 367 GetSwitchValueAsInt(
368 *cmd, 368 *cmd,
369 cc::switches::kSlowDownRasterScaleFactor, 369 cc::switches::kSlowDownRasterScaleFactor,
370 kMinSlowDownScaleFactor, 370 kMinSlowDownScaleFactor,
371 kMaxSlowDownScaleFactor, 371 kMaxSlowDownScaleFactor,
372 &settings.initial_debug_state.slow_down_raster_scale_factor); 372 &settings.initial_debug_state.slow_down_raster_scale_factor);
373 } 373 }
374 374
375 settings.strict_layer_property_change_checking =
376 cmd->HasSwitch(cc::switches::kStrictLayerPropertyChangeChecking);
377
378 #if defined(OS_ANDROID) 375 #if defined(OS_ANDROID)
379 DCHECK(!SynchronousCompositorFactory::GetInstance() || 376 DCHECK(!SynchronousCompositorFactory::GetInstance() ||
380 !cmd->HasSwitch(switches::kIPCSyncCompositing)); 377 !cmd->HasSwitch(switches::kIPCSyncCompositing));
381 bool using_synchronous_compositor = 378 bool using_synchronous_compositor =
382 SynchronousCompositorFactory::GetInstance() || 379 SynchronousCompositorFactory::GetInstance() ||
383 cmd->HasSwitch(switches::kIPCSyncCompositing); 380 cmd->HasSwitch(switches::kIPCSyncCompositing);
384 381
385 // We can't use GPU rasterization on low-end devices, because the Ganesh 382 // We can't use GPU rasterization on low-end devices, because the Ganesh
386 // cache would consume too much memory. 383 // cache would consume too much memory.
387 if (base::SysInfo::IsLowEndDevice()) 384 if (base::SysInfo::IsLowEndDevice())
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 #endif 1110 #endif
1114 return actual; 1111 return actual;
1115 } 1112 }
1116 1113
1117 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1114 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1118 float device_scale) { 1115 float device_scale) {
1119 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1116 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1120 } 1117 }
1121 1118
1122 } // namespace content 1119 } // namespace content
OLDNEW
« ash/drag_drop/drag_image_view.cc ('K') | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698