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

Unified Diff: cc/resources/raster_worker_pool.h

Issue 17625002: cc: Eliminate tile.h's dependency on tile_manager.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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/raster_mode.cc ('k') | cc/resources/raster_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/raster_worker_pool.h
diff --git a/cc/resources/raster_worker_pool.h b/cc/resources/raster_worker_pool.h
index 31013765b6ccfb6870bed7ef04602d1a1fc4beb9..7b910994749b356e6b37faaf8c590ffebd761a9c 100644
--- a/cc/resources/raster_worker_pool.h
+++ b/cc/resources/raster_worker_pool.h
@@ -10,7 +10,7 @@
#include "base/containers/hash_tables.h"
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/resources/picture_pile_impl.h"
-#include "cc/resources/resource_provider.h"
+#include "cc/resources/raster_mode.h"
#include "cc/resources/tile_priority.h"
#include "cc/resources/worker_pool.h"
@@ -24,6 +24,7 @@ namespace cc {
class PicturePileImpl;
class PixelBufferRasterWorkerPool;
class Resource;
+class ResourceProvider;
namespace internal {
@@ -77,31 +78,6 @@ template <> struct hash<cc::internal::RasterWorkerPoolTask*> {
namespace cc {
-// Low quality implies no lcd test; high quality implies lcd text.
-// Note that the order of these matters. It is organized in the order in which
-// we can promote tiles. That is, we always move from higher number enum to
-// lower number: low quality can be re-rastered as high quality with or without
-// LCD text; high quality LCD can only move to high quality no LCD mode. We
-// currently don't support moving from no LCD to LCD high quality.
-// TODO(vmpstr): Find a better place for this.
-enum RasterMode {
- HIGH_QUALITY_NO_LCD_RASTER_MODE = 0,
- HIGH_QUALITY_RASTER_MODE = 1,
- LOW_QUALITY_RASTER_MODE = 2,
- NUM_RASTER_MODES = 3
-};
-
-// Data that is passed to raster tasks.
-// TODO(vmpstr): Find a better place for this.
-struct RasterTaskMetadata {
- scoped_ptr<base::Value> AsValue() const;
- bool is_tile_in_pending_tree_now_bin;
- TileResolution tile_resolution;
- int layer_id;
- const void* tile_id;
- int source_frame_number;
-};
-
class CC_EXPORT RasterWorkerPoolClient {
public:
virtual bool ShouldForceTasksRequiredForActivationToComplete() const = 0;
@@ -205,13 +181,18 @@ class CC_EXPORT RasterWorkerPool : public WorkerPool {
// even if they later get canceled by another call to ScheduleTasks().
virtual void ScheduleTasks(RasterTask::Queue* queue) = 0;
+ // TODO(vmpstr): Figure out an elegant way to not pass this many parameters.
static RasterTask CreateRasterTask(
const Resource* resource,
PicturePileImpl* picture_pile,
gfx::Rect content_rect,
float contents_scale,
RasterMode raster_mode,
- const RasterTaskMetadata& metadata,
+ bool is_tile_in_pending_tree_now_bin,
+ TileResolution tile_resolution,
+ int layer_id,
+ const void* tile_id,
+ int source_frame_number,
RenderingStatsInstrumentation* rendering_stats,
const RasterTask::Reply& reply,
Task::Set* dependencies);
« no previous file with comments | « cc/resources/raster_mode.cc ('k') | cc/resources/raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698