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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2605993002: Experiment with more aggressive MSE GC on memory pressure (Closed)
Patch Set: Improve feature handling (CR feedback) 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2830 static_cast<RenderFrame*>(this), 2830 static_cast<RenderFrame*>(this),
2831 GetWebMediaPlayerDelegate()->has_played_media()), 2831 GetWebMediaPlayerDelegate()->has_played_media()),
2832 audio_renderer_sink, media_log, render_thread->GetMediaThreadTaskRunner(), 2832 audio_renderer_sink, media_log, render_thread->GetMediaThreadTaskRunner(),
2833 render_thread->GetWorkerTaskRunner(), 2833 render_thread->GetWorkerTaskRunner(),
2834 render_thread->compositor_task_runner(), context_3d_cb, 2834 render_thread->compositor_task_runner(), context_3d_cb,
2835 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, 2835 base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory,
2836 base::Unretained(blink::mainThreadIsolate())), 2836 base::Unretained(blink::mainThreadIsolate())),
2837 initial_cdm, media_surface_manager_, media_observer, 2837 initial_cdm, media_surface_manager_, media_observer,
2838 // TODO(avayvod, asvitkine): Query the value directly when it is available 2838 // TODO(avayvod, asvitkine): Query the value directly when it is available
2839 // in the renderer process. See https://crbug.com/681160. 2839 // in the renderer process. See https://crbug.com/681160.
2840 GetWebkitPreferences().max_keyframe_distance_to_disable_background_video); 2840 GetWebkitPreferences().max_keyframe_distance_to_disable_background_video,
2841 GetWebkitPreferences().mse_force_gc_on_memory_pressure);
2841 2842
2842 bool use_fallback_path = false; 2843 bool use_fallback_path = false;
2843 #if defined(OS_ANDROID) 2844 #if defined(OS_ANDROID)
2844 use_fallback_path = !UseWebMediaPlayerImpl(url); 2845 use_fallback_path = !UseWebMediaPlayerImpl(url);
2845 2846
2846 if (use_fallback_path && 2847 if (use_fallback_path &&
2847 !base::FeatureList::IsEnabled(media::kAndroidMediaPlayerRenderer)) { 2848 !base::FeatureList::IsEnabled(media::kAndroidMediaPlayerRenderer)) {
2848 return CreateAndroidWebMediaPlayer(client, encrypted_client, params); 2849 return CreateAndroidWebMediaPlayer(client, encrypted_client, params);
2849 } 2850 }
2850 #endif // defined(OS_ANDROID) 2851 #endif // defined(OS_ANDROID)
(...skipping 4014 matching lines...) Expand 10 before | Expand all | Expand 10 after
6865 // event target. Potentially a Pepper plugin will receive the event. 6866 // event target. Potentially a Pepper plugin will receive the event.
6866 // In order to tell whether a plugin gets the last mouse event and which it 6867 // In order to tell whether a plugin gets the last mouse event and which it
6867 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6868 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6868 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6869 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6869 // |pepper_last_mouse_event_target_|. 6870 // |pepper_last_mouse_event_target_|.
6870 pepper_last_mouse_event_target_ = nullptr; 6871 pepper_last_mouse_event_target_ = nullptr;
6871 #endif 6872 #endif
6872 } 6873 }
6873 6874
6874 } // namespace content 6875 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698