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

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, 3 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 527b621170fa5585a9a6d0d031b663e6e785188c..abfcd2ab02f5d0a9e62b04258c2261ea1015a1a9 100644
--- a/content/browser/compositor/surface_display_output_surface.cc
+++ b/content/browser/compositor/surface_display_output_surface.cc
@@ -14,14 +14,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_(NULL),
surface_manager_(surface_manager),
factory_(surface_manager, this),
- allocator_(surface_id_namespace) {
+ allocator_(allocator) {
capabilities_.delegated_rendering = true;
capabilities_.max_frames_pending = 1;
}
@@ -40,7 +40,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_->Resize(surface_id_, frame_size);

Powered by Google App Engine
This is Rietveld 408576698