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; |