| Index: cc/tiles/tile_draw_info.h
|
| diff --git a/cc/tiles/tile_draw_info.h b/cc/tiles/tile_draw_info.h
|
| index a51d27b9916df2e3b6aa73c0983f9f95f2005d5d..2ca0c3207e875fe1dfc86fd2dd64f3cda58b6497 100644
|
| --- a/cc/tiles/tile_draw_info.h
|
| +++ b/cc/tiles/tile_draw_info.h
|
| @@ -27,7 +27,7 @@ class CC_EXPORT TileDrawInfo {
|
| bool IsReadyToDraw() const {
|
| switch (mode_) {
|
| case RESOURCE_MODE:
|
| - return !!resource_;
|
| + return ready_to_draw_;
|
| case SOLID_COLOR_MODE:
|
| case OOM_MODE:
|
| return true;
|
| @@ -35,10 +35,11 @@ class CC_EXPORT TileDrawInfo {
|
| NOTREACHED();
|
| return false;
|
| }
|
| +
|
| bool NeedsRaster() const {
|
| switch (mode_) {
|
| case RESOURCE_MODE:
|
| - return !resource_;
|
| + return !ready_to_draw_;
|
| case SOLID_COLOR_MODE:
|
| return false;
|
| case OOM_MODE:
|
| @@ -71,9 +72,9 @@ class CC_EXPORT TileDrawInfo {
|
| return mode_ == RESOURCE_MODE || mode_ == OOM_MODE;
|
| }
|
|
|
| - inline bool has_resource() const { return !!resource_; }
|
| + bool has_resource() const { return !!resource_; }
|
|
|
| - inline bool has_compressed_resource() const {
|
| + bool has_compressed_resource() const {
|
| return resource_ ? IsResourceFormatCompressed(resource_->format()) : false;
|
| }
|
|
|
| @@ -91,6 +92,11 @@ class CC_EXPORT TileDrawInfo {
|
|
|
| void set_use_resource() { mode_ = RESOURCE_MODE; }
|
|
|
| + void set_resource(Resource* resource) {
|
| + DCHECK_EQ(RESOURCE_MODE, mode_);
|
| + resource_ = resource;
|
| + }
|
| +
|
| void set_solid_color(const SkColor& color) {
|
| mode_ = SOLID_COLOR_MODE;
|
| solid_color_ = color;
|
| @@ -98,9 +104,18 @@ class CC_EXPORT TileDrawInfo {
|
|
|
| void set_oom() { mode_ = OOM_MODE; }
|
|
|
| + void set_ready_to_draw(bool ready_to_draw) { ready_to_draw_ = ready_to_draw; }
|
| +
|
| + void set_contents_swizzled(bool contents_swizzled) {
|
| + contents_swizzled_ = contents_swizzled;
|
| + }
|
| +
|
| + Resource* resource() const { return resource_; }
|
| +
|
| Mode mode_;
|
| SkColor solid_color_;
|
| Resource* resource_;
|
| + bool ready_to_draw_;
|
| bool contents_swizzled_;
|
|
|
| // Used for gathering UMA stats.
|
|
|