Commit 16c93fe2 authored by Aaron Krajeski's avatar Aaron Krajeski Committed by Commit Bot

Don't need a gl_interface to record canvas if unaccelerated

Change-Id: I72c79c5d130b460c8115f649ee0ae192dfcc83d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1703239Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Commit-Queue: Aaron Krajeski <aaronhk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678326}
parent 967ff700
...@@ -535,7 +535,11 @@ void Canvas2DLayerBridge::FlushRecording() { ...@@ -535,7 +535,11 @@ void Canvas2DLayerBridge::FlushRecording() {
FinishRasterTimers(gl_interface); FinishRasterTimers(gl_interface);
} }
bool measure_raster_metric = gl_interface && is_deferral_enabled_ && // Sample one out of every kRasterMetricProbability frames to time
// This measurement only makes sense if deferral is enabled
// If the canvas is accelerated, we also need access to the gl_interface
bool measure_raster_metric = (gl_interface || !IsAccelerated()) &&
is_deferral_enabled_ &&
bernoulli_distribution_(random_generator_); bernoulli_distribution_(random_generator_);
RasterTimer rasterTimer; RasterTimer rasterTimer;
base::Optional<base::ElapsedTimer> timer; base::Optional<base::ElapsedTimer> timer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment