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

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

Issue 12665005: cc: Use highp precision for texture coords if available and needed (Closed) Base URL: http://git.chromium.org/chromium/src.git@highp2
Patch Set: rebase after all dependencies landed Created 7 years, 8 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/trees/layer_tree_settings.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | 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 #include <map> 9 #include <map>
10 10
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 void CompositorImpl::SetVisible(bool visible) { 183 void CompositorImpl::SetVisible(bool visible) {
184 if (!visible) { 184 if (!visible) {
185 host_.reset(); 185 host_.reset();
186 } else if (!host_.get()) { 186 } else if (!host_.get()) {
187 cc::LayerTreeSettings settings; 187 cc::LayerTreeSettings settings;
188 settings.refresh_rate = 60.0; 188 settings.refresh_rate = 60.0;
189 settings.impl_side_painting = false; 189 settings.impl_side_painting = false;
190 settings.calculate_top_controls_position = false; 190 settings.calculate_top_controls_position = false;
191 settings.top_controls_height = 0.f; 191 settings.top_controls_height = 0.f;
192 settings.use_memory_management = false; 192 settings.use_memory_management = false;
193 settings.highp_threshold_min = 2048;
193 194
194 // Do not clear the framebuffer when rendering into external GL contexts 195 // Do not clear the framebuffer when rendering into external GL contexts
195 // like Android View System's. 196 // like Android View System's.
196 if (UsesDirectGL()) 197 if (UsesDirectGL())
197 settings.should_clear_root_render_pass = false; 198 settings.should_clear_root_render_pass = false;
198 199
199 scoped_ptr<cc::Thread> impl_thread; 200 scoped_ptr<cc::Thread> impl_thread;
200 if (g_impl_thread) 201 if (g_impl_thread)
201 impl_thread = cc::ThreadImpl::CreateForDifferentThread( 202 impl_thread = cc::ThreadImpl::CreateForDifferentThread(
202 g_impl_thread->message_loop()->message_loop_proxy()); 203 g_impl_thread->message_loop()->message_loop_proxy());
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 case ANDROID_BITMAP_FORMAT_RGBA_8888: 445 case ANDROID_BITMAP_FORMAT_RGBA_8888:
445 return GL_UNSIGNED_BYTE; 446 return GL_UNSIGNED_BYTE;
446 break; 447 break;
447 case ANDROID_BITMAP_FORMAT_RGB_565: 448 case ANDROID_BITMAP_FORMAT_RGB_565:
448 default: 449 default:
449 return GL_UNSIGNED_SHORT_5_6_5; 450 return GL_UNSIGNED_SHORT_5_6_5;
450 } 451 }
451 } 452 }
452 453
453 } // namespace content 454 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698