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

Unified Diff: cc/resources/picture_pile.cc

Issue 773373002: Update from https://crrev.com/306706 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/resources/picture.cc ('k') | net/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index d94ce7cf2187b535237031aec82d8c78e2f8081b..c3050c311563dbc55e7e053b7539954ae734486e 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -556,8 +556,16 @@ void PicturePile::CreatePictures(ContentLayerClient* painter,
// even if that content is replaced by gpu-friendly content.
// This is an optimization to avoid iterating though all pictures in
// the pile after each invalidation.
- is_suitable_for_gpu_rasterization_ &=
- picture->IsSuitableForGpuRasterization();
+ if (is_suitable_for_gpu_rasterization_) {
+ const char* reason = nullptr;
+ is_suitable_for_gpu_rasterization_ &=
+ picture->IsSuitableForGpuRasterization(&reason);
+
+ if (!is_suitable_for_gpu_rasterization_) {
+ TRACE_EVENT_INSTANT1("cc", "GPU Rasterization Veto",
+ TRACE_EVENT_SCOPE_THREAD, "reason", reason);
+ }
+ }
}
bool found_tile_for_recorded_picture = false;
« no previous file with comments | « cc/resources/picture.cc ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698