From 5d4e44fa925a42afcdffdf1999d22d313ae2630d Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 18 Sep 2015 12:06:27 -0700 Subject: [PATCH] Remove SurfaceAllocator because it is unused. --- services/sky/compositor/BUILD.gn | 2 -- services/sky/compositor/surface_allocator.cc | 26 ------------------ services/sky/compositor/surface_allocator.h | 29 -------------------- services/sky/compositor/surface_holder.cc | 1 - services/sky/compositor/surface_holder.h | 2 -- 5 files changed, 60 deletions(-) delete mode 100644 services/sky/compositor/surface_allocator.cc delete mode 100644 services/sky/compositor/surface_allocator.h diff --git a/services/sky/compositor/BUILD.gn b/services/sky/compositor/BUILD.gn index ead14b1f2..9824792c1 100644 --- a/services/sky/compositor/BUILD.gn +++ b/services/sky/compositor/BUILD.gn @@ -18,8 +18,6 @@ source_set("compositor") { "rasterizer_ganesh.h", "resource_manager.cc", "resource_manager.h", - "surface_allocator.cc", - "surface_allocator.h", "surface_holder.cc", "surface_holder.h", "texture_cache.cc", diff --git a/services/sky/compositor/surface_allocator.cc b/services/sky/compositor/surface_allocator.cc deleted file mode 100644 index d5176b8c1..000000000 --- a/services/sky/compositor/surface_allocator.cc +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "services/sky/compositor/surface_allocator.h" - -#include "base/logging.h" - -namespace sky { - -SurfaceAllocator::SurfaceAllocator(uint32_t id_namespace) - : id_namespace_(id_namespace), next_id_(1) { - DCHECK(id_namespace); -} - -SurfaceAllocator::~SurfaceAllocator() { -} - -mojo::SurfaceIdPtr SurfaceAllocator::CreateSurfaceId() { - auto id = mojo::SurfaceId::New(); - id->local = next_id_++; - id->id_namespace = id_namespace_; - return id.Pass(); -} - -} // namespace sky diff --git a/services/sky/compositor/surface_allocator.h b/services/sky/compositor/surface_allocator.h deleted file mode 100644 index 86c350e92..000000000 --- a/services/sky/compositor/surface_allocator.h +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef SKY_VIEWER_COMPOSITOR_SURFACE_ALLOCATOR_H_ -#define SKY_VIEWER_COMPOSITOR_SURFACE_ALLOCATOR_H_ - -#include "base/basictypes.h" -#include "mojo/services/surfaces/public/interfaces/surface_id.mojom.h" - -namespace sky { - -class SurfaceAllocator { - public: - SurfaceAllocator(uint32_t id_namespace); - ~SurfaceAllocator(); - - mojo::SurfaceIdPtr CreateSurfaceId(); - - private: - uint32_t id_namespace_; - uint32_t next_id_; - - DISALLOW_COPY_AND_ASSIGN(SurfaceAllocator); -}; - -} // namespace sky - -#endif // SKY_VIEWER_COMPOSITOR_SURFACE_ALLOCATOR_H_ diff --git a/services/sky/compositor/surface_holder.cc b/services/sky/compositor/surface_holder.cc index 87f06afdb..2bf727cbd 100644 --- a/services/sky/compositor/surface_holder.cc +++ b/services/sky/compositor/surface_holder.cc @@ -9,7 +9,6 @@ #include "mojo/converters/geometry/geometry_type_converters.h" #include "mojo/public/cpp/application/connect.h" #include "mojo/public/interfaces/application/shell.mojom.h" -#include "services/sky/compositor/surface_allocator.h" namespace sky { diff --git a/services/sky/compositor/surface_holder.h b/services/sky/compositor/surface_holder.h index cd34c90e8..c8f82d8cc 100644 --- a/services/sky/compositor/surface_holder.h +++ b/services/sky/compositor/surface_holder.h @@ -18,8 +18,6 @@ class Shell; } namespace sky { -class SurfaceAllocator; - class SurfaceHolder : public mojo::ResourceReturner { public: class Client {