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

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

Issue 12224129: cc: Disable memory management in the browser compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « cc/layer_tree_settings.cc ('k') | no next file » | 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/compositor_impl_android.h" 5 #include "content/browser/renderer_host/compositor_impl_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 #include <android/native_window_jni.h> 8 #include <android/native_window_jni.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 void CompositorImpl::SetVisible(bool visible) { 169 void CompositorImpl::SetVisible(bool visible) {
170 if (!visible) { 170 if (!visible) {
171 host_.reset(); 171 host_.reset();
172 } else if (!host_.get()) { 172 } else if (!host_.get()) {
173 cc::LayerTreeSettings settings; 173 cc::LayerTreeSettings settings;
174 settings.refreshRate = 60.0; 174 settings.refreshRate = 60.0;
175 settings.implSidePainting = false; 175 settings.implSidePainting = false;
176 settings.calculateTopControlsPosition = false; 176 settings.calculateTopControlsPosition = false;
177 settings.topControlsHeight = 0.f; 177 settings.topControlsHeight = 0.f;
178 settings.useMemoryManagement = false;
178 179
179 // Do not clear the framebuffer when rendering into external GL contexts 180 // Do not clear the framebuffer when rendering into external GL contexts
180 // like Android View System's. 181 // like Android View System's.
181 if (UsesDirectGL()) 182 if (UsesDirectGL())
182 settings.shouldClearRootRenderPass = false; 183 settings.shouldClearRootRenderPass = false;
183 184
184 scoped_ptr<cc::Thread> impl_thread; 185 scoped_ptr<cc::Thread> impl_thread;
185 if (g_impl_thread) 186 if (g_impl_thread)
186 impl_thread = cc::ThreadImpl::createForDifferentThread( 187 impl_thread = cc::ThreadImpl::createForDifferentThread(
187 g_impl_thread->message_loop()->message_loop_proxy()); 188 g_impl_thread->message_loop()->message_loop_proxy());
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 case ANDROID_BITMAP_FORMAT_RGBA_8888: 425 case ANDROID_BITMAP_FORMAT_RGBA_8888:
425 return GL_UNSIGNED_BYTE; 426 return GL_UNSIGNED_BYTE;
426 break; 427 break;
427 case ANDROID_BITMAP_FORMAT_RGB_565: 428 case ANDROID_BITMAP_FORMAT_RGB_565:
428 default: 429 default:
429 return GL_UNSIGNED_SHORT_5_6_5; 430 return GL_UNSIGNED_SHORT_5_6_5;
430 } 431 }
431 } 432 }
432 433
433 } // namespace content 434 } // namespace content
OLDNEW
« no previous file with comments | « cc/layer_tree_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698