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

Unified Diff: cc/tile_manager.h

Issue 12316084: cc: Consolidate the analysis_canvas operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win warning fix Created 7 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/tile.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile_manager.h
diff --git a/cc/tile_manager.h b/cc/tile_manager.h
index 6d2c621bf7e37ad0cc84df5e28fadc7c4740b6c2..095f9a872f593bfd0872fdf9bda7de3b0589b37f 100644
--- a/cc/tile_manager.h
+++ b/cc/tile_manager.h
@@ -14,6 +14,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "cc/memory_history.h"
+#include "cc/picture_pile_impl.h"
#include "cc/rendering_stats.h"
#include "cc/resource_pool.h"
#include "cc/tile_priority.h"
@@ -92,6 +93,8 @@ class CC_EXPORT ManagedTileState {
TileResolution resolution;
float time_to_needed_in_seconds;
float distance_to_visible_in_pixels;
+ PicturePileImpl::Analysis picture_pile_analysis;
+ bool picture_pile_analyzed;
};
// This class manages tiles, deciding which should get rasterized and which
@@ -103,7 +106,9 @@ class CC_EXPORT TileManager : public WorkerPoolClient {
TileManager(TileManagerClient* client,
ResourceProvider *resource_provider,
size_t num_raster_threads,
- bool use_cheapess_estimator);
+ bool use_cheapess_estimator,
+ bool use_color_estimator,
+ bool prediction_benchmarking);
virtual ~TileManager();
const GlobalStateThatImpactsTilePriority& GlobalState() const {
@@ -148,13 +153,14 @@ class CC_EXPORT TileManager : public WorkerPoolClient {
// Data that is passed to raster tasks.
struct RasterTaskMetadata {
- bool use_cheapness_estimator;
+ bool prediction_benchmarking;
bool is_tile_in_pending_tree_now_bin;
TileResolution tile_resolution;
int layer_id;
};
RasterTaskMetadata GetRasterTaskMetadata(const Tile& tile) const;
+
void SortTiles();
void AssignGpuMemoryToTiles();
void FreeResourcesForTile(Tile* tile);
@@ -165,6 +171,7 @@ class CC_EXPORT TileManager : public WorkerPoolClient {
manage_tiles_pending_ = true;
}
void DispatchMoreTasks();
+ void AnalyzeTile(Tile* tile);
void GatherPixelRefsForTile(Tile* tile);
void DispatchImageDecodeTasksForTile(Tile* tile);
void DispatchOneImageDecodeTask(
@@ -197,6 +204,11 @@ class CC_EXPORT TileManager : public WorkerPoolClient {
static void RecordCheapnessPredictorResults(bool is_predicted_cheap,
bool is_actually_cheap);
+ static void RecordSolidColorPredictorResults(const SkColor* actual_colors,
+ size_t color_count,
+ bool is_predicted_solid,
+ SkColor predicted_color,
+ bool is_predicted_transparent);
TileManagerClient* client_;
scoped_ptr<ResourcePool> resource_pool_;
@@ -231,9 +243,11 @@ class CC_EXPORT TileManager : public WorkerPoolClient {
RenderingStats rendering_stats_;
bool use_cheapness_estimator_;
+ bool use_color_estimator_;
bool did_schedule_cheap_tasks_;
bool allow_cheap_tasks_;
int raster_state_count_[NUM_STATES][NUM_TREES][NUM_BINS];
+ bool prediction_benchmarking_;
DISALLOW_COPY_AND_ASSIGN(TileManager);
};
« no previous file with comments | « cc/tile.cc ('k') | cc/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698