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

Unified Diff: cc/layers/delegated_frame_resource_collection.h

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/layers/delegated_frame_provider_unittest.cc ('k') | cc/layers/delegated_frame_resource_collection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/delegated_frame_resource_collection.h
diff --git a/cc/layers/delegated_frame_resource_collection.h b/cc/layers/delegated_frame_resource_collection.h
deleted file mode 100644
index afbc3555a94d7118c904bf24e477cc7ec19f42ea..0000000000000000000000000000000000000000
--- a/cc/layers/delegated_frame_resource_collection.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 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 CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_
-#define CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_
-
-#include "base/containers/hash_tables.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "base/threading/thread_checker.h"
-#include "cc/base/cc_export.h"
-#include "cc/resources/return_callback.h"
-#include "cc/resources/returned_resource.h"
-#include "cc/resources/transferable_resource.h"
-
-namespace cc {
-
-class CC_EXPORT DelegatedFrameResourceCollectionClient {
- public:
- // Called to inform the client that returned resources can be
- // grabbed off the DelegatedFrameResourceCollection.
- virtual void UnusedResourcesAreAvailable() = 0;
-};
-
-class CC_EXPORT DelegatedFrameResourceCollection
- : public base::RefCounted<DelegatedFrameResourceCollection> {
- public:
- DelegatedFrameResourceCollection();
-
- void SetClient(DelegatedFrameResourceCollectionClient* client);
-
- void TakeUnusedResourcesForChildCompositor(ReturnedResourceArray* array);
-
- // Considers all resources as lost, and returns true if it held any resource
- // to lose.
- bool LoseAllResources();
-
- // Methods for DelegatedFrameProvider.
- void RefResources(const TransferableResourceArray& resources);
- void UnrefResources(const ReturnedResourceArray& returned);
- void ReceivedResources(const TransferableResourceArray& resources);
- ReturnCallback GetReturnResourcesCallbackForImplThread();
-
- private:
- friend class base::RefCounted<DelegatedFrameResourceCollection>;
- ~DelegatedFrameResourceCollection();
-
- DelegatedFrameResourceCollectionClient* client_;
-
- ReturnedResourceArray returned_resources_for_child_compositor_;
- bool lost_all_resources_;
-
- struct RefCount {
- int refs_to_return;
- int refs_to_wait_for;
- };
- typedef base::hash_map<unsigned, RefCount> ResourceIdRefCountMap;
- ResourceIdRefCountMap resource_id_ref_count_map_;
-
- base::ThreadChecker main_thread_checker_;
- base::WeakPtrFactory<DelegatedFrameResourceCollection> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(DelegatedFrameResourceCollection);
-};
-
-} // namespace cc
-
-#endif // CC_LAYERS_DELEGATED_FRAME_RESOURCE_COLLECTION_H_
« no previous file with comments | « cc/layers/delegated_frame_provider_unittest.cc ('k') | cc/layers/delegated_frame_resource_collection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698