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

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 bde972a9f6ed05a6cedd09ae3a2d250fdde4bed3..002753af2e4a62ae9f3704ef31577535edba08d7 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;
}
@@ -46,7 +46,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