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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 77c484fd1a4a6bef187c2bec963533ec8a750c4f..d2041ac2735cdc175f5f39950a4ea8202e391120 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -152,8 +152,14 @@ size_t GetMaxTransferBufferUsageBytes(
unsigned GetMapImageTextureTarget(
const ContextProvider::Capabilities& context_capabilities) {
+// TODO(reveman): This should be a setting passed to the compositor instead
+// of hard-coded here. The target that need to be used depends on our choice
+// of GpuMemoryBuffer type. Note: SURFACE_TEXTURE needs EXTERNAL_OES,
+// IO_SURFACE needs RECTANGLE_ARB. crbug.com/431059
+#if defined(OS_ANDROID)
if (context_capabilities.gpu.egl_image_external)
return GL_TEXTURE_EXTERNAL_OES;
+#endif
if (context_capabilities.gpu.texture_rectangle)
return GL_TEXTURE_RECTANGLE_ARB;
@@ -1874,9 +1880,11 @@ void LayerTreeHostImpl::ActivateSyncTree() {
if (debug_state_.continuous_painting) {
const RenderingStats& stats =
rendering_stats_instrumentation_->GetRenderingStats();
- paint_time_counter_->SavePaintTime(stats.main_stats.paint_time +
- stats.main_stats.record_time +
- stats.impl_stats.rasterize_time);
+ // TODO(hendrikw): This requires a different metric when we commit directly
+ // to the active tree. See crbug.com/429311.
+ paint_time_counter_->SavePaintTime(
+ stats.impl_stats.commit_to_activate_duration.GetLastTimeDelta() +
+ stats.impl_stats.draw_duration.GetLastTimeDelta());
}
if (time_source_client_adapter_ && time_source_client_adapter_->Active())
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698