New issue
Advanced search Search tips

Issue 675054 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Adding SatisfySequence and RequireSequence to SurfaceManager

Project Member Reported by samans@chromium.org, Dec 16 2016

Issue description

There is a lot of identical code throughout the codebase for requiring / satisfying surface sequences. 

https://cs.chromium.org/search/?q=%22Attempting+to+require+callback+on+nonexistent+surface%22&sq=package:chromium&type=cs

I suggest adding RequireSequence(surface_id, sequence) and SatisfySequence(sequence) to SurfaceManager to replace the duplicate code.

Also, now that satisfies_sequences in CompositorFrameMetadata is gone, there is absolutely no reason for DidSatisfySequence to take a vector of sequences as opposed to one.

So once we have SatisfySequence, DidSatisfySequence should go away.
 
Blocking: 601863
Components: Internals>MUS
Labels: Proj-Mustash-Mus displaycompositor Proj-Mustash-Mus-GPU
I would recommend also unifying IPCs that do "Require" and "Satisfy" as well as a part of the incremental cleanup work. On the other hand, this code path will go away in favor of SurfaceReferences eventually so maybe it's not worth the time investment?

Deduping code as an incremental step doesn't seem like a waste of time because it reduces the call sites that need to change in a subsequent CL so perhaps this work isn't wasteful? 

I think the value of this incremental step is hard to gauge, and I wouldn't block or fault anyone for addressing this bug along the way.
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1221800150ab0969c63166809616392db5a02729

commit 1221800150ab0969c63166809616392db5a02729
Author: samans <samans@chromium.org>
Date: Tue Jan 10 03:10:42 2017

Adding SatisfySequence and RequireSequence to SurfaceManager

Now that satisfies_sequences in CompositorFrameMetadata is gone, there
is absolutely no reason for SurfaceManager::DidSatisfySequences to take
a vector of sequences as opposed to one.
This CL replaces DidSatisfySequence with SatisfySequence and also creates
SurfaceManager::RequireSequence which helps remove duplicate code
throughout the code base.

TBR=piman@chromium.org
BUG= 675054 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2614423003
Cr-Commit-Position: refs/heads/master@{#442461}

[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/cc/surfaces/compositor_frame_sink_support.cc
[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/cc/surfaces/direct_surface_reference_factory.cc
[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/cc/surfaces/surface_factory_unittest.cc
[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/cc/surfaces/surface_manager.cc
[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/cc/surfaces/surface_manager.h
[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/cc/surfaces/surface_manager_ref_unittest.cc
[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/content/browser/browser_plugin/browser_plugin_guest.cc
[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/content/browser/frame_host/cross_process_frame_connector.cc
[modify] https://crrev.com/1221800150ab0969c63166809616392db5a02729/content/browser/renderer_host/offscreen_canvas_surface_impl.cc

Comment 3 by samans@chromium.org, Jan 16 2017

Status: Fixed (was: Untriaged)
Blocking: -601863
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment