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

Issue 2465093002: cc: Add OutputSurface state snapshots.

Created:
4 years, 1 month ago by reveman
Modified:
3 years, 10 months ago
Reviewers:
danakj
CC:
cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, ozone-reviews_chromium.org, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Add OutputSurface state snapshots. This makes the surfaceless output surface used on ChromeOS produce state snapshots that can be used for display latency measurements when cc.debug.outputsurface category is enabled. BUG=661010 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Patch Set 1 #

Patch Set 2 : remove crtc trace #

Patch Set 3 : nits #

Total comments: 4

Patch Set 4 : move last_vsync_interval_ assignment #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+299 lines, -24 lines) Patch
M cc/output/direct_renderer.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M cc/output/direct_renderer.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M cc/output/gl_renderer.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 4 chunks +99 lines, -16 lines 0 comments Download
M cc/output/output_surface_client.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M cc/surfaces/display.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M cc/surfaces/display.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M cc/test/fake_output_surface_client.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M components/display_compositor/buffer_queue.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M components/display_compositor/buffer_queue.cc View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
M content/browser/compositor/browser_compositor_output_surface.h View 1 2 3 4 2 chunks +7 lines, -1 line 0 comments Download
M content/browser/compositor/browser_compositor_output_surface.cc View 1 2 3 4 2 chunks +21 lines, -7 lines 0 comments Download
M content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc View 1 2 3 4 4 chunks +116 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (3 generated)
reveman
See https://docs.google.com/a/google.com/document/d/1sj_RPGUlE_L3eVEJf7TeFYTVbFOf4geUn3ELeG6Q3mo/edit?usp=sharing for more context. Trace viewer side change can be found here: https://codereview.chromium.org/2466023004 This ...
4 years, 1 month ago (2016-11-01 22:54:34 UTC) #4
danakj
I have a high level question. We show content inside frames already, why not just ...
4 years, 1 month ago (2016-11-01 23:33:01 UTC) #5
reveman
4 years, 1 month ago (2016-11-02 00:37:05 UTC) #6
On 2016/11/01 at 23:33:01, danakj wrote:
> I have a high level question. We show content inside frames already, why not
just highlight which layers were put into overlays and the content will come
from already existing sources? Showing this every 60 frames is going to make it
very unreliable for trying to debug stuff.

What do you mean by "inside frames"? If there's a better place to perform these
readbacks then we can move them as long as the following constraints are
fulfilled:

The main purpose of this patch is high accuracy latency measurements for Arc++
but it can also be used for debugging hw overlay support. Custom test
applications are expected to be used in both cases so it's easy to predict
output over a large number of frames. For latency measurements to be accurate
all work needed to capture these snapshots need to happen after the display
controller is done scanning out the buffer and it has been replaced by a new
buffer to avoid having the readback work effect the measurement. The interval
for the readback also needs to be large enough that one readback doesn't effect
the next readback. 60 frames has proven to be sufficient on the devices I've
tested this on so far.

Also, the buffers we receive from Arc++ are similar to the buffers in the buffer
queue and attempting to do a readback from the buffer directly without first
making a copy of the buffer using the GPU can be very slow.

https://codereview.chromium.org/2465093002/diff/40001/cc/output/output_surfac...
File cc/output/output_surface_client.h (right):

https://codereview.chromium.org/2465093002/diff/40001/cc/output/output_surfac...
cc/output/output_surface_client.h:42: std::vector<SkBitmap>* bitmaps,
On 2016/11/01 at 23:33:01, danakj wrote:
> why not a parameter of the Callback?

It just evolved this way. I guess the alternative is to pass
std::unique_ptr<std::vector<SkBitmap>> with this callback and
std::unique_ptr<SkBitmap> with the framebuffer version but it seemed a bit
easier to just allocate these objects upfront and the buffer queue and
outputsurface fill them in. Let me know if you prefer that or have a better idea
for how to do this.

https://codereview.chromium.org/2465093002/diff/40001/content/browser/composi...
File content/browser/compositor/browser_compositor_output_surface.cc (right):

https://codereview.chromium.org/2465093002/diff/40001/content/browser/composi...
content/browser/compositor/browser_compositor_output_surface.cc:64:
last_vsync_interval_ = interval;
On 2016/11/01 at 23:33:01, danakj wrote:
> shouldnt this be after the is_zero adjustment

Done.

Powered by Google App Engine
This is Rietveld 408576698