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

Unified Diff: ui/compositor/layer.cc

Issue 666163006: Allow layers to signal that additional sequences are needed before surface destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
« cc/surfaces/surface_manager.cc ('K') | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 502e533d1412250934d4c5ee62f8ad46a3ba7684..fc6d48eff9c3a3946d17786a3aa1e8b328dd76e3 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -569,11 +569,15 @@ void Layer::SetShowDelegatedContent(cc::DelegatedFrameProvider* frame_provider,
RecomputeDrawsContentAndUVRect();
}
-void Layer::SetShowSurface(cc::SurfaceId id, gfx::Size frame_size_in_dip) {
+void Layer::SetShowSurface(cc::SurfaceId surface_id,
+ cc::SurfaceLayer::SatisfyCallback satisfy_callback,
+ cc::SurfaceLayer::RequireCallback require_callback,
+ gfx::Size frame_size_in_dip) {
DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
- scoped_refptr<cc::SurfaceLayer> new_layer = cc::SurfaceLayer::Create();
- new_layer->SetSurfaceId(id);
+ scoped_refptr<cc::SurfaceLayer> new_layer =
+ cc::SurfaceLayer::Create(satisfy_callback, require_callback);
+ new_layer->SetSurfaceId(surface_id);
SwitchToLayer(new_layer);
surface_layer_ = new_layer;
« cc/surfaces/surface_manager.cc ('K') | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698