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

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: Improve feature handling (CR feedback) Created 3 years, 11 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
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(avayvod, asvitkine): Query the value directly when it is available in
DaleCurtis 2017/01/26 23:07:36 TODO(servolk? :)
servolk 2017/01/27 00:52:13 Done.
554 // the renderer process. See https://crbug.com/681160.
555 prefs.mse_force_gc_on_memory_pressure =
556 variations::GetVariationParamByFeatureAsBool(
557 media::kReduceMSEBuffersOnMemoryPressure,
558 "mse_force_gc_on_memory_pressure", false);
DaleCurtis 2017/01/26 23:07:36 Not sure if we need two variations here or if the
servolk 2017/01/27 00:52:13 We need to have at least 3 states: 1. No action on
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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 } else { 1006 } else {
1000 render_view_ready_on_process_launch_ = true; 1007 render_view_ready_on_process_launch_ = true;
1001 } 1008 }
1002 } 1009 }
1003 1010
1004 void RenderViewHostImpl::RenderViewReady() { 1011 void RenderViewHostImpl::RenderViewReady() {
1005 delegate_->RenderViewReady(this); 1012 delegate_->RenderViewReady(this);
1006 } 1013 }
1007 1014
1008 } // namespace content 1015 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | content/public/common/web_preferences.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698