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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 226363004: Global GPU memory manager for android webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary code Created 6 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1044 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1045 render_view_host_ext_->SetJsOnlineProperty(network_up); 1045 render_view_host_ext_->SetJsOnlineProperty(network_up);
1046 } 1046 }
1047 1047
1048 void AwContents::TrimMemoryOnRenderThread(JNIEnv* env, 1048 void AwContents::TrimMemoryOnRenderThread(JNIEnv* env,
1049 jobject obj, 1049 jobject obj,
1050 jint level, 1050 jint level,
1051 jboolean visible) { 1051 jboolean visible) {
1052 if (hardware_renderer_) { 1052 if (hardware_renderer_) {
1053 if (hardware_renderer_->TrimMemory(level, visible)) { 1053 if (hardware_renderer_->TrimMemory(level, visible)) {
1054 content::BrowserThread::PostTask( 1054 BrowserThread::PostTask(
1055 content::BrowserThread::UI, 1055 BrowserThread::UI,
1056 FROM_HERE, 1056 FROM_HERE,
1057 base::Bind(&AwContents::ForceFakeComposite, ui_thread_weak_ptr_)); 1057 base::Bind(&AwContents::TrimMemory, ui_thread_weak_ptr_));
1058 } 1058 }
1059 } 1059 }
1060 } 1060 }
1061 1061
1062 void AwContents::ForceFakeComposite() { 1062 void AwContents::TrimMemory() {
1063 browser_view_renderer_.ForceFakeCompositeSW(); 1063 browser_view_renderer_.TrimMemory();
boliu 2014/04/28 22:22:15 This might be out of scope for this patch, but can
hush (inactive) 2014/04/30 20:50:17 I put trim memory into BVR. Haven't thought about
1064 } 1064 }
1065 1065
1066 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1066 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1067 g_should_download_favicons = true; 1067 g_should_download_favicons = true;
1068 } 1068 }
1069 1069
1070 } // namespace android_webview 1070 } // namespace android_webview
OLDNEW
« android_webview/browser/tile_resource_consumer.h ('K') | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698