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

Unified Diff: cc/surfaces/surface_manager.cc

Issue 2802023002: Remove SurfaceFactory And SurfaceFactoryClient (Closed)
Patch Set: Rebase SurfaceSynchronizationTest Created 3 years, 7 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
« no previous file with comments | « cc/surfaces/surface_manager.h ('k') | cc/surfaces/surface_manager_unittest.cc » ('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 e4267b4d6baf782c10439b3bd4f3abd5cfc6080e..19ea700870318400a2d6f73a21ff811b040d9c66 100644
--- a/cc/surfaces/surface_manager.cc
+++ b/cc/surfaces/surface_manager.cc
@@ -11,10 +11,10 @@
#include <utility>
#include "base/logging.h"
+#include "cc/surfaces/compositor_frame_sink_support.h"
#include "cc/surfaces/direct_surface_reference_factory.h"
#include "cc/surfaces/local_surface_id_allocator.h"
#include "cc/surfaces/surface.h"
-#include "cc/surfaces/surface_factory_client.h"
#include "cc/surfaces/surface_info.h"
#if DCHECK_IS_ON()
@@ -75,18 +75,20 @@ void SurfaceManager::RequestSurfaceResolution(Surface* pending_surface) {
}
std::unique_ptr<Surface> SurfaceManager::CreateSurface(
- base::WeakPtr<SurfaceFactory> surface_factory,
+ base::WeakPtr<CompositorFrameSinkSupport> compositor_frame_sink_support,
const LocalSurfaceId& local_surface_id) {
DCHECK(thread_checker_.CalledOnValidThread());
- DCHECK(local_surface_id.is_valid() && surface_factory);
+ DCHECK(local_surface_id.is_valid() && compositor_frame_sink_support);
- SurfaceId surface_id(surface_factory->frame_sink_id(), local_surface_id);
+ SurfaceId surface_id(compositor_frame_sink_support->frame_sink_id(),
+ local_surface_id);
// If no surface with this SurfaceId exists, simply create the surface and
// return.
auto surface_iter = surface_map_.find(surface_id);
if (surface_iter == surface_map_.end()) {
- auto surface = base::MakeUnique<Surface>(surface_id, surface_factory);
+ auto surface =
+ base::MakeUnique<Surface>(surface_id, compositor_frame_sink_support);
surface_map_[surface->surface_id()] = surface.get();
return surface;
}
@@ -108,7 +110,8 @@ std::unique_ptr<Surface> SurfaceManager::CreateSurface(
std::unique_ptr<Surface> surface = std::move(*it);
surfaces_to_destroy_.erase(it);
surface->set_destroyed(false);
- DCHECK_EQ(surface_factory.get(), surface->factory().get());
+ DCHECK_EQ(compositor_frame_sink_support.get(),
+ surface->compositor_frame_sink_support().get());
return surface;
}
« no previous file with comments | « cc/surfaces/surface_manager.h ('k') | cc/surfaces/surface_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698