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

Unified Diff: mojo/aura/context_factory_mojo.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: mojo/aura/context_factory_mojo.cc
diff --git a/mojo/aura/context_factory_mojo.cc b/mojo/aura/context_factory_mojo.cc
index 6b2b709cdcd75a7aa9c3c7c0020a6aaaef7e5a04..38355ce5d78f0dd2130b7713591fbbb85cd55ff2 100644
--- a/mojo/aura/context_factory_mojo.cc
+++ b/mojo/aura/context_factory_mojo.cc
@@ -8,6 +8,7 @@
#include "cc/output/output_surface.h"
#include "cc/output/software_output_device.h"
#include "cc/resources/shared_bitmap_manager.h"
+#include "cc/surfaces/surface_id_allocator.h"
#include "mojo/aura/window_tree_host_mojo.h"
#include "skia/ext/platform_canvas.h"
#include "ui/compositor/reflector.h"
@@ -93,7 +94,8 @@ class TestSharedBitmapManager : public cc::SharedBitmapManager {
} // namespace
ContextFactoryMojo::ContextFactoryMojo()
- : shared_bitmap_manager_(new TestSharedBitmapManager()) {
+ : shared_bitmap_manager_(new TestSharedBitmapManager()),
+ next_surface_id_namespace_(1u) {
}
ContextFactoryMojo::~ContextFactoryMojo() {}
@@ -133,4 +135,10 @@ base::MessageLoopProxy* ContextFactoryMojo::GetCompositorMessageLoop() {
return NULL;
}
+scoped_ptr<cc::SurfaceIdAllocator>
+ContextFactoryMojo::CreateSurfaceIdAllocator() {
+ return make_scoped_ptr(
+ new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
+}
+
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698