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

Unified Diff: ui/aura/local/window_port_local.cc

Issue 2919373002: cc: De-special-case SurfaceLayer code (Closed)
Patch Set: Fix cc_unittests Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/android/delegated_frame_host_android.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/local/window_port_local.cc
diff --git a/ui/aura/local/window_port_local.cc b/ui/aura/local/window_port_local.cc
index 688393f1310181e7b33cf74147e6ad451c563670..2739a87bf00c1ccd770711dab01e728ea176d3fe 100644
--- a/ui/aura/local/window_port_local.cc
+++ b/ui/aura/local/window_port_local.cc
@@ -134,12 +134,14 @@ void WindowPortLocal::OnSurfaceChanged(const cc::SurfaceId& surface_id,
// mirror layer to update its surface using the latest bounds.
window_->layer()->SetBounds(
gfx::Rect(window_->layer()->bounds().origin(), surface_size));
- window_->layer()->SetShowPrimarySurface(
- cc::SurfaceInfo(surface_id, 1.0f, surface_size),
+ cc::SurfaceInfo surface_info(surface_id, 1.0f, surface_size);
+ scoped_refptr<cc::SurfaceReferenceFactory> reference_factory =
aura::Env::GetInstance()
->context_factory_private()
->GetSurfaceManager()
- ->reference_factory());
+ ->reference_factory();
+ window_->layer()->SetShowPrimarySurface(surface_info, reference_factory);
+ window_->layer()->SetFallbackSurface(surface_info);
}
} // namespace aura
« no previous file with comments | « ui/android/delegated_frame_host_android.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698