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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 132543002: Not for review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/test_context_support.cc ('k') | cc/trees/thread_proxy.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 84d9f892e52b65bcb1733690778ca64017e97762..553e87182b2b0e04f4e5cfb103fe75f4fb20f2b7 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1424,7 +1424,7 @@ void LayerTreeHostImpl::DrawLayers(FrameData* frame,
false);
}
// The render passes should be consumed by the renderer.
- DCHECK(frame->render_passes.empty());
+ // DCHECK(frame->render_passes.empty());
frame->render_passes_by_id.clear();
// The next frame should start by assuming nothing has changed, and changes
@@ -1473,6 +1473,24 @@ bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) {
return false;
}
CompositorFrameMetadata metadata = MakeCompositorFrameMetadata();
+
+ for (size_t i = 0; i < frame.render_passes.size(); i++) {
+ if (frame.render_passes[i]->handled_by_overlay_hardware) {
+ metadata.overlay_position = frame.render_passes[i]->overlay_hardware_rect;
+ QuadList& quad_list = frame.render_passes[i]->quad_list;
+ const DrawQuad& quad = *(*quad_list.BackToFrontBegin());
+ metadata.overlay_texture_id_ = 0;
+ if (quad.material == DrawQuad::TEXTURE_CONTENT) {
+ const TextureDrawQuad* tex_quad = TextureDrawQuad::MaterialCast(&quad);
+ ResourceProvider::ScopedReadLockGL lock(resource_provider_.get(),
+ tex_quad->resource_id);
+ metadata.overlay_texture_id_ = lock.texture_id();
+ }
+
+ break;
+ }
+ }
+
active_tree()->FinishSwapPromises(&metadata);
renderer_->SwapBuffers(metadata);
return true;
« no previous file with comments | « cc/test/test_context_support.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698