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

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

Issue 2820643002: Decouple some graphics-related IsLowEndDevice() policies for 1GB devices. (Closed)
Patch Set: Rebase Created 3 years, 8 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 settings->SetReportScreenSizeInPhysicalPixelsQuirk( 1030 settings->SetReportScreenSizeInPhysicalPixelsQuirk(
1031 prefs.report_screen_size_in_physical_pixels_quirk); 1031 prefs.report_screen_size_in_physical_pixels_quirk);
1032 settings->SetShouldReuseGlobalForUnownedMainFrame( 1032 settings->SetShouldReuseGlobalForUnownedMainFrame(
1033 prefs.resue_global_for_unowned_main_frame); 1033 prefs.resue_global_for_unowned_main_frame);
1034 settings->SetProgressBarCompletion( 1034 settings->SetProgressBarCompletion(
1035 static_cast<WebSettings::ProgressBarCompletion>( 1035 static_cast<WebSettings::ProgressBarCompletion>(
1036 prefs.progress_bar_completion)); 1036 prefs.progress_bar_completion));
1037 settings->SetPreferHiddenVolumeControls(true); 1037 settings->SetPreferHiddenVolumeControls(true);
1038 settings->SetSpellCheckEnabledByDefault(prefs.spellcheck_enabled_by_default); 1038 settings->SetSpellCheckEnabledByDefault(prefs.spellcheck_enabled_by_default);
1039 1039
1040 // Force preload=none and disable autoplay on older or low end Android 1040 // Force preload=none and disable autoplay on older Android
1041 // platforms because their media pipelines are not stable enough to handle 1041 // platforms because their media pipelines are not stable enough to handle
1042 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826. 1042 // concurrent elements. See http://crbug.com/612909, http://crbug.com/622826.
1043 const bool is_low_end_device = 1043 const bool is_jelly_bean =
1044 base::android::BuildInfo::GetInstance()->sdk_int() <= 1044 base::android::BuildInfo::GetInstance()->sdk_int() <=
1045 base::android::SDK_VERSION_JELLY_BEAN_MR2 || 1045 base::android::SDK_VERSION_JELLY_BEAN_MR2;
1046 base::SysInfo::IsLowEndDevice(); 1046 settings->SetForcePreloadNoneForMediaElements(is_jelly_bean);
1047 // TODO(mlamouri): rename this setting "isLowEndDevice".
1048 settings->SetForcePreloadNoneForMediaElements(is_low_end_device);
1049 1047
1050 WebRuntimeFeatures::EnableVideoFullscreenOrientationLock( 1048 WebRuntimeFeatures::EnableVideoFullscreenOrientationLock(
1051 prefs.video_fullscreen_orientation_lock_enabled); 1049 prefs.video_fullscreen_orientation_lock_enabled);
1052 WebRuntimeFeatures::EnableVideoFullscreenDetection( 1050 WebRuntimeFeatures::EnableVideoFullscreenDetection(
1053 prefs.video_fullscreen_detection_enabled); 1051 prefs.video_fullscreen_detection_enabled);
1054 settings->SetEmbeddedMediaExperienceEnabled( 1052 settings->SetEmbeddedMediaExperienceEnabled(
1055 prefs.embedded_media_experience_enabled); 1053 prefs.embedded_media_experience_enabled);
1056 settings->SetDoNotUpdateSelectionOnMutatingSelectionRange( 1054 settings->SetDoNotUpdateSelectionOnMutatingSelectionRange(
1057 prefs.do_not_update_selection_on_mutating_selection_range); 1055 prefs.do_not_update_selection_on_mutating_selection_range);
1058 #else // defined(OS_ANDROID) 1056 #else // defined(OS_ANDROID)
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2672 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2675 } 2673 }
2676 2674
2677 std::unique_ptr<InputEventAck> ack(new InputEventAck( 2675 std::unique_ptr<InputEventAck> ack(new InputEventAck(
2678 InputEventAckSource::MAIN_THREAD, input_event->GetType(), 2676 InputEventAckSource::MAIN_THREAD, input_event->GetType(),
2679 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2677 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2680 OnInputEventAck(std::move(ack)); 2678 OnInputEventAck(std::move(ack));
2681 } 2679 }
2682 2680
2683 } // namespace content 2681 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_webmediaplayer_delegate.cc ('k') | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698