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

Unified Diff: cc/tile_manager.h

Issue 12194015: cc: Rasterize cheap tiles immediately (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Trace event for cheap rasters that weren't. Created 7 years, 10 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
Index: cc/tile_manager.h
diff --git a/cc/tile_manager.h b/cc/tile_manager.h
index 16212ed66e5f7398d0bbbaf572f245ace0824ace..568b4d66335858e99e22505130f18a1179660ecf 100644
--- a/cc/tile_manager.h
+++ b/cc/tile_manager.h
@@ -11,6 +11,7 @@
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
+#include "base/time.h"
#include "base/values.h"
#include "cc/memory_history.h"
#include "cc/rendering_stats.h"
@@ -95,7 +96,8 @@ class CC_EXPORT TileManager {
TileManager(TileManagerClient* client,
ResourceProvider *resource_provider,
size_t num_raster_threads,
- bool record_rendering_stats);
+ bool record_rendering_stats,
+ bool use_cheapess_estimator);
virtual ~TileManager();
const GlobalStateThatImpactsTilePriority& GlobalState() const {
@@ -105,6 +107,7 @@ class CC_EXPORT TileManager {
void ManageTiles();
void CheckForCompletedTileUploads();
+ void ResetCheapRasterBudget();
scoped_ptr<base::Value> AsValue() const;
void GetMemoryStats(size_t* memoryRequiredBytes,
@@ -144,8 +147,15 @@ class CC_EXPORT TileManager {
scoped_refptr<Tile> tile, skia::LazyPixelRef* pixel_ref);
void OnImageDecodeTaskCompleted(
scoped_refptr<Tile> tile, uint32_t pixel_ref_id);
- bool CanDispatchRasterTask(Tile* tile);
+ bool CanDispatchRasterTask(Tile* tile) const;
+ bool CanPerformCheapRaster(Tile* tile) const;
+ scoped_ptr<ResourcePool::Resource> PrepareTileForRaster(Tile* tile);
void DispatchOneRasterTask(scoped_refptr<Tile> tile);
+ void PerformOneRaster(Tile* tile);
+ void OnRasterCompleted(
+ scoped_refptr<Tile> tile,
+ scoped_ptr<ResourcePool::Resource> resource,
+ int manage_tiles_call_count_when_dispatched);
void OnRasterTaskCompleted(
scoped_refptr<Tile> tile,
scoped_ptr<ResourcePool::Resource> resource,
@@ -157,7 +167,7 @@ class CC_EXPORT TileManager {
WhichTree tree);
scoped_ptr<Value> GetMemoryRequirementsAsValue() const;
- static void RunRasterTask(uint8* buffer,
+ static void PerformRaster(uint8* buffer,
const gfx::Rect& rect,
float contents_scale,
PicturePileImpl* picture_pile,
@@ -194,6 +204,10 @@ class CC_EXPORT TileManager {
bool record_rendering_stats_;
RenderingStats rendering_stats_;
+ bool use_cheapness_estimator_;
+ int cheap_raster_count_;
+ base::TimeDelta cheap_raster_time_;
+
int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS];
DISALLOW_COPY_AND_ASSIGN(TileManager);

Powered by Google App Engine
This is Rietveld 408576698