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

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

Issue 2229543003: mus: Disable external begin-frame source in the renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« 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) 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 <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // Use 1/4th of staging buffers on low-end devices. 505 // Use 1/4th of staging buffers on low-end devices.
506 if (base::SysInfo::IsLowEndDevice()) 506 if (base::SysInfo::IsLowEndDevice())
507 settings.max_staging_buffer_usage_in_bytes /= 4; 507 settings.max_staging_buffer_usage_in_bytes /= 4;
508 508
509 cc::ManagedMemoryPolicy current = settings.memory_policy_; 509 cc::ManagedMemoryPolicy current = settings.memory_policy_;
510 settings.memory_policy_ = GetGpuMemoryPolicy(current); 510 settings.memory_policy_ = GetGpuMemoryPolicy(current);
511 511
512 settings.use_cached_picture_raster = 512 settings.use_cached_picture_raster =
513 !cmd.HasSwitch(cc::switches::kDisableCachedPictureRaster); 513 !cmd.HasSwitch(cc::switches::kDisableCachedPictureRaster);
514 514
515 if (cmd.HasSwitch(switches::kUseRemoteCompositing)) 515 if (cmd.HasSwitch(switches::kUseRemoteCompositing) ||
516 cmd.HasSwitch(switches::kIsRunningInMash))
516 settings.use_external_begin_frame_source = false; 517 settings.use_external_begin_frame_source = false;
517 518
518 return settings; 519 return settings;
519 } 520 }
520 521
521 // static 522 // static
522 cc::ManagedMemoryPolicy RenderWidgetCompositor::GetGpuMemoryPolicy( 523 cc::ManagedMemoryPolicy RenderWidgetCompositor::GetGpuMemoryPolicy(
523 const cc::ManagedMemoryPolicy& policy) { 524 const cc::ManagedMemoryPolicy& policy) {
524 cc::ManagedMemoryPolicy actual = policy; 525 cc::ManagedMemoryPolicy actual = policy;
525 actual.bytes_limit_when_visible = 0; 526 actual.bytes_limit_when_visible = 0;
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 1146
1146 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); 1147 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized));
1147 } 1148 }
1148 1149
1149 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( 1150 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1150 float device_scale) { 1151 float device_scale) {
1151 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); 1152 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1152 } 1153 }
1153 1154
1154 } // namespace content 1155 } // namespace content
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