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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2605993002: Experiment with more aggressive MSE GC on memory pressure (Closed)
Patch Set: rebase/resolve conflicts Created 3 years, 10 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 | content/public/common/common_param_traits_macros.h » ('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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 543
544 // TODO(avayvod, asvitkine): Query the value directly when it is available in 544 // TODO(avayvod, asvitkine): Query the value directly when it is available in
545 // the renderer process. See https://crbug.com/681160. 545 // the renderer process. See https://crbug.com/681160.
546 prefs.max_keyframe_distance_to_disable_background_video = 546 prefs.max_keyframe_distance_to_disable_background_video =
547 base::TimeDelta::FromMilliseconds( 547 base::TimeDelta::FromMilliseconds(
548 variations::GetVariationParamByFeatureAsInt( 548 variations::GetVariationParamByFeatureAsInt(
549 media::kBackgroundVideoTrackOptimization, 549 media::kBackgroundVideoTrackOptimization,
550 "max_keyframe_distance_ms", 550 "max_keyframe_distance_ms",
551 base::TimeDelta::FromSeconds(10).InMilliseconds())); 551 base::TimeDelta::FromSeconds(10).InMilliseconds()));
552 552
553 // TODO(servolk, asvitkine): Query the value directly when it is available in
554 // the renderer process. See https://crbug.com/681160.
555 prefs.enable_instant_source_buffer_gc =
556 variations::GetVariationParamByFeatureAsBool(
557 media::kMemoryPressureBasedSourceBufferGC,
558 "enable_instant_source_buffer_gc", false);
559
553 std::map<std::string, std::string> expensive_background_throttling_prefs; 560 std::map<std::string, std::string> expensive_background_throttling_prefs;
554 variations::GetVariationParamsByFeature( 561 variations::GetVariationParamsByFeature(
555 features::kExpensiveBackgroundTimerThrottling, 562 features::kExpensiveBackgroundTimerThrottling,
556 &expensive_background_throttling_prefs); 563 &expensive_background_throttling_prefs);
557 SetFloatParameterFromMap(expensive_background_throttling_prefs, "cpu_budget", 564 SetFloatParameterFromMap(expensive_background_throttling_prefs, "cpu_budget",
558 &prefs.expensive_background_throttling_cpu_budget); 565 &prefs.expensive_background_throttling_cpu_budget);
559 SetFloatParameterFromMap( 566 SetFloatParameterFromMap(
560 expensive_background_throttling_prefs, "initial_budget", 567 expensive_background_throttling_prefs, "initial_budget",
561 &prefs.expensive_background_throttling_initial_budget); 568 &prefs.expensive_background_throttling_initial_budget);
562 SetFloatParameterFromMap(expensive_background_throttling_prefs, "max_budget", 569 SetFloatParameterFromMap(expensive_background_throttling_prefs, "max_budget",
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 } else { 991 } else {
985 render_view_ready_on_process_launch_ = true; 992 render_view_ready_on_process_launch_ = true;
986 } 993 }
987 } 994 }
988 995
989 void RenderViewHostImpl::RenderViewReady() { 996 void RenderViewHostImpl::RenderViewReady() {
990 delegate_->RenderViewReady(this); 997 delegate_->RenderViewReady(this);
991 } 998 }
992 999
993 } // namespace content 1000 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698