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

Unified Diff: cc/tiles/tile_draw_info.h

Issue 2440093003: WIP GPU scheduler + delayed activation / tile draw
Patch Set: SignalSyncToken -> IsFenceSyncReleased Created 4 years 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/test/fake_raster_buffer_provider.cc ('k') | cc/tiles/tile_draw_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « cc/test/fake_raster_buffer_provider.cc ('k') | cc/tiles/tile_draw_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698