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

Unified Diff: cc/tiles/tile_draw_info.cc

Issue 2555743004: Delay activation/draw on GPU tile work completion (Closed)
Patch Set: rebase Created 3 years, 11 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/tiles/tile_draw_info.cc
diff --git a/cc/tiles/tile_draw_info.cc b/cc/tiles/tile_draw_info.cc
index 29f2cc833799ebfcb1606126dc4af34111e52909..461775b73024dcd6923524ef565fef31701310b4 100644
--- a/cc/tiles/tile_draw_info.cc
+++ b/cc/tiles/tile_draw_info.cc
@@ -10,11 +10,7 @@
namespace cc {
TileDrawInfo::TileDrawInfo()
- : mode_(RESOURCE_MODE),
- solid_color_(SK_ColorWHITE),
- resource_(nullptr),
- contents_swizzled_(false),
- was_ever_ready_to_draw_(false),
+ : was_ever_ready_to_draw_(false),
was_ever_used_to_draw_(false),
was_a_prepaint_tile_(false) {}
@@ -32,4 +28,13 @@ void TileDrawInfo::AsValueInto(base::trace_event::TracedValue* state) const {
mode_ == SOLID_COLOR_MODE && !SkColorGetA(solid_color_));
}
+Resource* TileDrawInfo::TakeResource() {
+ if (!resource_)
vmpstr 2017/01/05 22:00:46 Don't need this if.
ericrk 2017/01/09 23:05:21 Done.
+ return nullptr;
+
+ Resource* resource = resource_;
+ set_resource(nullptr);
+ return resource;
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698