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

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

Issue 11552009: Add support for calculating the position of the top controls in the cc layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 | Annotate | Revision Log
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 SetVisible(true); 165 SetVisible(true);
166 } 166 }
167 } 167 }
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.calculateTopControlsPosition = false;
176 settings.topControlsHeightPx = 0;
175 177
176 // Do not clear the framebuffer when rendering into external GL contexts 178 // Do not clear the framebuffer when rendering into external GL contexts
177 // like Android View System's. 179 // like Android View System's.
178 if (UsesDirectGL()) 180 if (UsesDirectGL())
179 settings.shouldClearRootRenderPass = false; 181 settings.shouldClearRootRenderPass = false;
180 182
181 scoped_ptr<cc::Thread> impl_thread; 183 scoped_ptr<cc::Thread> impl_thread;
182 if (g_impl_thread) 184 if (g_impl_thread)
183 impl_thread = cc::ThreadImpl::createForDifferentThread( 185 impl_thread = cc::ThreadImpl::createForDifferentThread(
184 g_impl_thread->message_loop()->message_loop_proxy()); 186 g_impl_thread->message_loop()->message_loop_proxy());
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 case ANDROID_BITMAP_FORMAT_RGBA_8888: 423 case ANDROID_BITMAP_FORMAT_RGBA_8888:
422 return GL_UNSIGNED_BYTE; 424 return GL_UNSIGNED_BYTE;
423 break; 425 break;
424 case ANDROID_BITMAP_FORMAT_RGB_565: 426 case ANDROID_BITMAP_FORMAT_RGB_565:
425 default: 427 default:
426 return GL_UNSIGNED_SHORT_5_6_5; 428 return GL_UNSIGNED_SHORT_5_6_5;
427 } 429 }
428 } 430 }
429 431
430 } // namespace content 432 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698