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

Unified Diff: cc/resources/resource_update_controller.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/resources/resource_update.cc ('k') | cc/resources/resource_update_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_update_controller.h
diff --git a/cc/resources/resource_update_controller.h b/cc/resources/resource_update_controller.h
deleted file mode 100644
index 1946df47c1636468a2f75ff36aba065c1891a6f2..0000000000000000000000000000000000000000
--- a/cc/resources/resource_update_controller.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2012 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_RESOURCES_RESOURCE_UPDATE_CONTROLLER_H_
-#define CC_RESOURCES_RESOURCE_UPDATE_CONTROLLER_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/time/time.h"
-#include "cc/base/cc_export.h"
-#include "cc/resources/resource_update_queue.h"
-
-namespace base { class SingleThreadTaskRunner; }
-
-namespace cc {
-
-class ResourceProvider;
-
-class ResourceUpdateControllerClient {
- public:
- virtual void ReadyToFinalizeTextureUpdates() = 0;
-
- protected:
- virtual ~ResourceUpdateControllerClient() {}
-};
-
-class CC_EXPORT ResourceUpdateController {
- public:
- static scoped_ptr<ResourceUpdateController> Create(
- ResourceUpdateControllerClient* client,
- base::SingleThreadTaskRunner* task_runner,
- scoped_ptr<ResourceUpdateQueue> queue,
- ResourceProvider* resource_provider) {
- return make_scoped_ptr(new ResourceUpdateController(
- client, task_runner, queue.Pass(), resource_provider));
- }
- static size_t MaxPartialTextureUpdates();
-
- virtual ~ResourceUpdateController();
-
- // Discard uploads to textures that were evicted on the impl thread.
- void DiscardUploadsToEvictedResources();
-
- void PerformMoreUpdates(base::TimeTicks time_limit);
- void Finalize();
-
-
- // Virtual for testing.
- virtual size_t UpdateMoreTexturesSize() const;
- virtual base::TimeTicks UpdateMoreTexturesCompletionTime();
-
- protected:
- ResourceUpdateController(ResourceUpdateControllerClient* client,
- base::SingleThreadTaskRunner* task_runner,
- scoped_ptr<ResourceUpdateQueue> queue,
- ResourceProvider* resource_provider);
-
- private:
- static size_t MaxFullUpdatesPerTick(ResourceProvider* resource_provider);
-
- size_t MaxBlockingUpdates() const;
-
- void UpdateTexture(ResourceUpdate update);
-
- // This returns true when there were textures left to update.
- bool UpdateMoreTexturesIfEnoughTimeRemaining();
- void UpdateMoreTexturesNow();
- void OnTimerFired();
-
- ResourceUpdateControllerClient* client_;
- scoped_ptr<ResourceUpdateQueue> queue_;
- ResourceProvider* resource_provider_;
- base::TimeTicks time_limit_;
- size_t texture_updates_per_tick_;
- bool first_update_attempt_;
- base::SingleThreadTaskRunner* task_runner_;
- bool task_posted_;
- bool ready_to_finalize_;
- base::WeakPtrFactory<ResourceUpdateController> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ResourceUpdateController);
-};
-
-} // namespace cc
-
-#endif // CC_RESOURCES_RESOURCE_UPDATE_CONTROLLER_H_
« no previous file with comments | « cc/resources/resource_update.cc ('k') | cc/resources/resource_update_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698