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

Unified Diff: cc/tile_manager.h

Issue 11348384: cc: Use asynchronous set pixels API for impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and removed unused CheckForPendingSetPixelsCompletion(). Created 8 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
Index: cc/tile_manager.h
diff --git a/cc/tile_manager.h b/cc/tile_manager.h
index 43c9064125097f9a0c5348d9b6ecaba89d4dbbf6..b4f303fdb746bed3b8384aac7a61553222c32a0e 100644
--- a/cc/tile_manager.h
+++ b/cc/tile_manager.h
@@ -5,6 +5,7 @@
#ifndef CC_TILE_MANAGER_H_
#define CC_TILE_MANAGER_H_
+#include <queue>
#include <vector>
#include "base/memory/scoped_ptr.h"
@@ -23,7 +24,7 @@ struct RenderingStats;
class CC_EXPORT TileManagerClient {
public:
virtual void ScheduleManageTiles() = 0;
- virtual void ScheduleRedraw() = 0;
+ virtual void ScheduleCheckForCompletedSetPixels() = 0;
protected:
virtual ~TileManagerClient() {}
@@ -50,6 +51,8 @@ class CC_EXPORT ManagedTileState {
bool can_use_gpu_memory;
bool can_be_freed;
scoped_ptr<ResourcePool::Resource> resource;
+ // |resource_id| will be 0 while resource is being initialized.
+ ResourceProvider::ResourceId resource_id;
bool resource_is_being_initialized;
bool contents_swizzled;
@@ -74,6 +77,7 @@ class CC_EXPORT TileManager {
void SetGlobalState(const GlobalStateThatImpactsTilePriority& state);
void ManageTiles();
+ void CheckForCompletedSetPixels();
void renderingStats(RenderingStats* stats);
@@ -88,6 +92,7 @@ class CC_EXPORT TileManager {
void AssignGpuMemoryToTiles();
void FreeResourcesForTile(Tile*);
void ScheduleManageTiles();
+ void ScheduleCheckForCompletedSetPixels();
void DispatchMoreRasterTasks();
void DispatchOneRasterTask(RasterThread*, scoped_refptr<Tile>);
void OnRasterTaskCompleted(
@@ -95,11 +100,12 @@ class CC_EXPORT TileManager {
scoped_ptr<ResourcePool::Resource>,
scoped_refptr<PicturePileImpl>,
RenderingStats*);
- void DidFinishTileInitialization(Tile*, scoped_ptr<ResourcePool::Resource>);
+ void DidFinishTileInitialization(Tile*);
TileManagerClient* client_;
scoped_ptr<ResourcePool> resource_pool_;
bool manage_tiles_pending_;
+ bool check_for_completed_set_pixels_pending_;
GlobalStateThatImpactsTilePriority global_state_;
@@ -107,10 +113,15 @@ class CC_EXPORT TileManager {
TileVector tiles_;
TileVector tiles_that_need_to_be_rasterized_;
+ typedef std::queue<scoped_refptr<Tile> > TileQueue;
+ TileQueue tiles_with_pending_set_pixels_;
+
typedef ScopedPtrVector<RasterThread> RasterThreadVector;
RasterThreadVector raster_threads_;
RenderingStats rendering_stats_;
+
+ DISALLOW_COPY_AND_ASSIGN(TileManager);
};
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698