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

Unified Diff: cc/surfaces/surface_manager.cc

Issue 2514033002: Introducing SurfaceReferenceFactory (Closed)
Patch Set: rebase Created 4 years 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 | « cc/surfaces/surface_manager.h ('k') | cc/surfaces/surface_reference_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_manager.cc
diff --git a/cc/surfaces/surface_manager.cc b/cc/surfaces/surface_manager.cc
index a6a01ed50ebc78b770fce7f26a0bd4006ecc8750..63700bac2157841de59a30c3000f000ae757d774 100644
--- a/cc/surfaces/surface_manager.cc
+++ b/cc/surfaces/surface_manager.cc
@@ -11,6 +11,7 @@
#include <utility>
#include "base/logging.h"
+#include "cc/surfaces/direct_surface_reference_factory.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory_client.h"
#include "cc/surfaces/surface_id_allocator.h"
@@ -34,6 +35,8 @@ SurfaceManager::SurfaceManager(LifetimeType lifetime_type)
LocalFrameId(1u, base::UnguessableToken::Create())),
weak_factory_(this) {
thread_checker_.DetachFromThread();
+ reference_factory_ =
+ new DirectSurfaceReferenceFactory(weak_factory_.GetWeakPtr());
}
SurfaceManager::~SurfaceManager() {
@@ -500,8 +503,4 @@ void SurfaceManager::SurfaceCreated(const SurfaceId& surface_id,
observer.OnSurfaceCreated(surface_id, frame_size, device_scale_factor);
}
-base::WeakPtr<SurfaceManager> SurfaceManager::GetWeakPtr() {
- return weak_factory_.GetWeakPtr();
-}
-
} // namespace cc
« no previous file with comments | « cc/surfaces/surface_manager.h ('k') | cc/surfaces/surface_reference_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698