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

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

Issue 12095071: Convert top controls to use DIP instead of PX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
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; 176 settings.calculateTopControlsPosition = false;
177 settings.topControlsHeightPx = 0; 177 settings.topControlsHeight = 0.f;
178 178
179 // Do not clear the framebuffer when rendering into external GL contexts 179 // Do not clear the framebuffer when rendering into external GL contexts
180 // like Android View System's. 180 // like Android View System's.
181 if (UsesDirectGL()) 181 if (UsesDirectGL())
182 settings.shouldClearRootRenderPass = false; 182 settings.shouldClearRootRenderPass = false;
183 183
184 scoped_ptr<cc::Thread> impl_thread; 184 scoped_ptr<cc::Thread> impl_thread;
185 if (g_impl_thread) 185 if (g_impl_thread)
186 impl_thread = cc::ThreadImpl::createForDifferentThread( 186 impl_thread = cc::ThreadImpl::createForDifferentThread(
187 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
424 case ANDROID_BITMAP_FORMAT_RGBA_8888: 424 case ANDROID_BITMAP_FORMAT_RGBA_8888:
425 return GL_UNSIGNED_BYTE; 425 return GL_UNSIGNED_BYTE;
426 break; 426 break;
427 case ANDROID_BITMAP_FORMAT_RGB_565: 427 case ANDROID_BITMAP_FORMAT_RGB_565:
428 default: 428 default:
429 return GL_UNSIGNED_SHORT_5_6_5; 429 return GL_UNSIGNED_SHORT_5_6_5;
430 } 430 }
431 } 431 }
432 432
433 } // namespace content 433 } // namespace content
OLDNEW
« no previous file with comments | « cc/switches.cc ('k') | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698