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

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: Add missing CC_EXPORT...learn to run try jobs manually 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.implSidePainting = false; 175 settings.implSidePainting = false;
176 settings.calculateTopControlsPosition = false;
177 settings.topControlsHeightPx = 0;
176 178
177 // Do not clear the framebuffer when rendering into external GL contexts 179 // Do not clear the framebuffer when rendering into external GL contexts
178 // like Android View System's. 180 // like Android View System's.
179 if (UsesDirectGL()) 181 if (UsesDirectGL())
180 settings.shouldClearRootRenderPass = false; 182 settings.shouldClearRootRenderPass = false;
181 183
182 scoped_ptr<cc::Thread> impl_thread; 184 scoped_ptr<cc::Thread> impl_thread;
183 if (g_impl_thread) 185 if (g_impl_thread)
184 impl_thread = cc::ThreadImpl::createForDifferentThread( 186 impl_thread = cc::ThreadImpl::createForDifferentThread(
185 g_impl_thread->message_loop()->message_loop_proxy()); 187 g_impl_thread->message_loop()->message_loop_proxy());
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 case ANDROID_BITMAP_FORMAT_RGBA_8888: 424 case ANDROID_BITMAP_FORMAT_RGBA_8888:
423 return GL_UNSIGNED_BYTE; 425 return GL_UNSIGNED_BYTE;
424 break; 426 break;
425 case ANDROID_BITMAP_FORMAT_RGB_565: 427 case ANDROID_BITMAP_FORMAT_RGB_565:
426 default: 428 default:
427 return GL_UNSIGNED_SHORT_5_6_5; 429 return GL_UNSIGNED_SHORT_5_6_5;
428 } 430 }
429 } 431 }
430 432
431 } // namespace content 433 } // namespace content
OLDNEW
« no previous file with comments | « cc/top_controls_manager_unittest.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698