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

Unified Diff: cc/resources/tile_manager.h

Issue 69343005: Added preliminary support for tile rasterization with Ganesh (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for tests that pass NULL resource_provider/context_provider. Created 7 years, 1 month 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/resources/tile_manager.h
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index 0aa89d749fb69c72217f05d6f2b537d67417f006..6cfba6722faf2b7b2e4a3f4415cb84fb43b14fd1 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -14,6 +14,7 @@
#include "base/values.h"
#include "cc/base/ref_counted_managed.h"
#include "cc/debug/rendering_stats_instrumentation.h"
+#include "cc/resources/gpu_rasterizer.h"
#include "cc/resources/managed_tile_state.h"
#include "cc/resources/memory_history.h"
#include "cc/resources/picture_pile_impl.h"
@@ -47,11 +48,13 @@ scoped_ptr<base::Value> RasterTaskCompletionStatsAsValue(
// by layers; they automatically register with the manager when they are
// created, and unregister from the manager when they are deleted.
class CC_EXPORT TileManager : public RasterWorkerPoolClient,
+ public GpuRasterizerClient,
public RefCountedManager<Tile> {
public:
static scoped_ptr<TileManager> Create(
TileManagerClient* client,
ResourceProvider* resource_provider,
+ ContextProvider* context_provider,
size_t num_raster_threads,
RenderingStatsInstrumentation* rendering_stats_instrumentation,
bool use_map_image,
@@ -72,7 +75,8 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
float contents_scale,
int layer_id,
int source_frame_number,
- bool can_use_lcd_text);
+ bool can_use_lcd_text,
+ bool use_gpu_rasterizer);
scoped_ptr<base::Value> BasicStateAsValue() const;
scoped_ptr<base::Value> AllTilesAsValue() const;
@@ -116,9 +120,14 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
}
}
+ // GpuRasterizerClient interface
+ virtual void OnGpuRasterTaskCompleted(
+ Tile* tile, scoped_ptr<ResourcePool::Resource> resource) OVERRIDE;
+
protected:
TileManager(TileManagerClient* client,
ResourceProvider* resource_provider,
+ ContextProvider* context_provider,
scoped_ptr<RasterWorkerPool> raster_worker_pool,
size_t num_raster_threads,
size_t max_raster_usage_bytes,
@@ -181,6 +190,7 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
TileManagerClient* client_;
scoped_ptr<ResourcePool> resource_pool_;
scoped_ptr<RasterWorkerPool> raster_worker_pool_;
+ scoped_ptr<GpuRasterizer> gpu_rasterizer_;
GlobalStateThatImpactsTilePriority global_state_;
typedef base::hash_map<Tile::Id, Tile*> TileMap;

Powered by Google App Engine
This is Rietveld 408576698