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

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

Issue 15673005: cc: Add compositor name for easier GPU debugging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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') | 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 #include <map> 9 #include <map>
10 10
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 g_surface_map.Get().insert(std::make_pair(surface_id_, j_surface)); 194 g_surface_map.Get().insert(std::make_pair(surface_id_, j_surface));
195 } 195 }
196 } 196 }
197 } 197 }
198 198
199 void CompositorImpl::SetVisible(bool visible) { 199 void CompositorImpl::SetVisible(bool visible) {
200 if (!visible) { 200 if (!visible) {
201 host_.reset(); 201 host_.reset();
202 } else if (!host_) { 202 } else if (!host_) {
203 cc::LayerTreeSettings settings; 203 cc::LayerTreeSettings settings;
204 settings.compositor_name = "AndroidCompositor";
aelias_OOO_until_Jul13 2013/05/29 05:41:11 "BrowserCompositor" would be clearer I think.
204 settings.refresh_rate = 60.0; 205 settings.refresh_rate = 60.0;
205 settings.impl_side_painting = false; 206 settings.impl_side_painting = false;
206 settings.calculate_top_controls_position = false; 207 settings.calculate_top_controls_position = false;
207 settings.top_controls_height = 0.f; 208 settings.top_controls_height = 0.f;
208 settings.use_memory_management = false; 209 settings.use_memory_management = false;
209 settings.highp_threshold_min = 2048; 210 settings.highp_threshold_min = 2048;
210 211
211 // Do not clear the framebuffer when rendering into external GL contexts 212 // Do not clear the framebuffer when rendering into external GL contexts
212 // like Android View System's. 213 // like Android View System's.
213 if (UsesDirectGL()) 214 if (UsesDirectGL())
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 case ANDROID_BITMAP_FORMAT_RGBA_8888: 459 case ANDROID_BITMAP_FORMAT_RGBA_8888:
459 return GL_UNSIGNED_BYTE; 460 return GL_UNSIGNED_BYTE;
460 break; 461 break;
461 case ANDROID_BITMAP_FORMAT_RGB_565: 462 case ANDROID_BITMAP_FORMAT_RGB_565:
462 default: 463 default:
463 return GL_UNSIGNED_SHORT_5_6_5; 464 return GL_UNSIGNED_SHORT_5_6_5;
464 } 465 }
465 } 466 }
466 467
467 } // namespace content 468 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698