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

Unified Diff: cc/surfaces/surface_factory.cc

Issue 1945533002: Add way to mark other Surface a predecessor for a Surface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/surfaces/surface_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory.cc
diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
index 0cbe9d5cebcdcfe97982e4fcee2917e38dda2551..aca36bb9398aff367f59778213304c835d13e7cf 100644
--- a/cc/surfaces/surface_factory.cc
+++ b/cc/surfaces/surface_factory.cc
@@ -53,6 +53,16 @@ void SurfaceFactory::Destroy(SurfaceId surface_id) {
manager_->Destroy(std::move(surface));
}
+void SurfaceFactory::SetPreviousFrameSurface(SurfaceId new_id,
+ SurfaceId old_id) {
+ OwningSurfaceMap::iterator it = surface_map_.find(new_id);
+ DCHECK(it != surface_map_.end());
+ Surface* old_surface = manager_->GetSurfaceForId(old_id);
+ if (old_surface) {
+ it->second->SetPreviousFrameSurface(old_surface);
+ }
+}
+
void SurfaceFactory::SubmitCompositorFrame(
SurfaceId surface_id,
std::unique_ptr<CompositorFrame> frame,
« no previous file with comments | « cc/surfaces/surface_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698