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

Unified Diff: content/browser/compositor/surface_display_output_surface.cc

Issue 553213003: Avoid destroying surface before the parent surface stops referencing it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: content/browser/compositor/surface_display_output_surface.cc
diff --git a/content/browser/compositor/surface_display_output_surface.cc b/content/browser/compositor/surface_display_output_surface.cc
index c1a09f8f4c646d3e99775aa9192418e7b6bfa39e..2f06581cd254f6686e2127b31712daf997453ea9 100644
--- a/content/browser/compositor/surface_display_output_surface.cc
+++ b/content/browser/compositor/surface_display_output_surface.cc
@@ -15,14 +15,14 @@ namespace content {
SurfaceDisplayOutputSurface::SurfaceDisplayOutputSurface(
cc::SurfaceManager* surface_manager,
- uint32_t surface_id_namespace,
+ cc::SurfaceIdAllocator* allocator,
const scoped_refptr<cc::ContextProvider>& context_provider)
: cc::OutputSurface(context_provider,
scoped_ptr<cc::SoftwareOutputDevice>()),
display_client_(NULL),
surface_manager_(surface_manager),
factory_(surface_manager, this),
- allocator_(surface_id_namespace) {
+ allocator_(allocator) {
capabilities_.delegated_rendering = true;
capabilities_.max_frames_pending = 1;
}
@@ -47,7 +47,7 @@ void SurfaceDisplayOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
if (!surface_id_.is_null()) {
factory_.Destroy(surface_id_);
}
- surface_id_ = allocator_.GenerateId();
+ surface_id_ = allocator_->GenerateId();
factory_.Create(surface_id_, frame_size);
display_size_ = frame_size;
display_client_->display()->Resize(surface_id_, frame_size);

Powered by Google App Engine
This is Rietveld 408576698