New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 738190 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature


Sign in to add a comment

ResourceProvider is two classes in one

Project Member Reported by danakj@chromium.org, Jun 29 2017

Issue description

Previously we had layer compositors that were both a child and a parent of other compositors, so they needed to act as service and client. This is no longer true as of the transition to having a display compositor.

We should split the responsibilities in ResourceProvider up. LayerTreeHost gets the client side of it. Display gets the service side of it.

This avoids having this code in a "common" place, where other consumers may want to use it, as the client side of it is specific to LayerTreeHost.

We want some lighter-weight client implementation for other FrameSink clients, such as offscreen canvas. Doing this split should help inform us with what that looks like as well.
 

Comment 1 by danakj@chromium.org, Jun 29 2017

Blocking: 722935

Comment 2 by piman@chromium.org, Jun 29 2017

Cc: sunn...@chromium.org

Comment 3 by danakj@chromium.org, Jun 30 2017

Cc: rjkroege@chromium.org

Comment 4 by xing...@intel.com, Jul 7 2017

Cc: xing...@intel.com

Comment 5 by xing...@intel.com, Jul 17 2017

How about name as below?
cc::ResourrceProvider//common part
==>cc::LayerTreeResourceProvider//Layer tree part
==>viz::DisplayResourceProvider//Display compositor part

If you are OK with this, I am willing to take this.

Comment 6 by danakj@chromium.org, Jul 18 2017

Owner: xing...@intel.com
Any common pieces should probably be in viz/common/display.

The client side should be in viz/client/display, as ClientResourceProvider.
The service stuff in viz/service/display, as ServerResourceProvider

Happy to have you take a look at it. If possible, would be nice to break it up in small CLs. One possible strategy is to make ServerResourceProvider and ClientResourceProvider each is-a or has-a cc::ResourceProvider so that it's nothing but a shell. Then work to move code in CLs out of cc::ResourceProvider to viz until the cc class is gone. Thanks!

Comment 7 by danakj@chromium.org, Jul 18 2017

Status: Assigned (was: Available)

Comment 8 by danakj@chromium.org, Jul 18 2017

Oh I should expand on that a bit. I forgot that there are also some things in there that are cc-specific.

viz/client/display/'s ClientResourceProvider would be general things for any user of the display compositor. Then we can make OffscreenCanvas use those things too for its needs. It should be pretty lightweight, just the means for preparing resource to send to, or receive from, parent roughly. Making OffscreenCanvas use it would be a good test for what's needed there.

A cc::LayerTreeResourceProvider sounds good for things that are specific to layer compositor. It might make sense to start with all the client code in cc::LayerTreeResourceProvider first, and then move pieces to viz/client/display/ to share with OffscreenCanvas after, depending how you want to approach the problem.


Comment 9 by danakj@chromium.org, Jul 18 2017

Here's example code in OffscreenCanvas thats setting up TransferableResource by hand but should ideally be using some viz/client/display/ library to do so: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp?rcl=f3c08c1c0b5f8ef765345e70d8609975abf3d156&l=273
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 29 2017

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

commit 1b0214b502b74220131e7377517a2d470e86ba23
Author: Xu Xing <xing.xu@intel.com>
Date: Sat Jul 29 01:10:45 2017

Split OffscreenCanvasResourceProvider from OffscreenCanvasFrameDispatcherImpl

Currently there are two kinds of ResourceProvider: Layer tree ResourceProvider,
Display ResourceProvider. ResourceProvider creates and manages GL textures and
shared bitmap for its owner.

After investigating OffscreenCanvasFrameDispatcherImpl, it did part of
ResourceProvider's job, such as manage FrameResource in ResourceMap. So here I
split the resource management related code from OffscreenCanvasFrameDispatcherImpl
into OffscreenCanvasResourceProvider.

BUG= 738190 

Change-Id: Iaba164e7a0944e2432b11b3646c1d42174edab1d
Reviewed-on: https://chromium-review.googlesource.com/591071
Commit-Queue: Xing Xu <xing.xu@intel.com>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490568}
[modify] https://crrev.com/1b0214b502b74220131e7377517a2d470e86ba23/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/1b0214b502b74220131e7377517a2d470e86ba23/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/1b0214b502b74220131e7377517a2d470e86ba23/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
[add] https://crrev.com/1b0214b502b74220131e7377517a2d470e86ba23/third_party/WebKit/Source/platform/graphics/OffscreenCanvasResourceProvider.cpp
[add] https://crrev.com/1b0214b502b74220131e7377517a2d470e86ba23/third_party/WebKit/Source/platform/graphics/OffscreenCanvasResourceProvider.h

Comment 11 by xing...@intel.com, Jul 29 2017

Status: Started (was: Assigned)
Thanks @danakj.
In resource_provider_unittest.cc, there is a concept grandpa  ResourceProvider. In related case, resources are chained like: child ResourceProvider => parent  ResourceProvider => grandpa  ResourceProvider.

But regarding to Layer tree(LayerTreeHostImpl) and GLRender(Display compositor),  there are only child ResourceProvider and parent ResourceProvider, No grandpa ResourceProvider  is observed during my investigation(even thinking about SurfaceLayer, I didn't see any grandpa ResourceProvider).

So how about remove the whole grandpa ResourceProvider related unittest in resource_provider_unittest.cc? 
Please correct me if anything missing.

Project Member

Comment 12 by bugdroid1@chromium.org, Aug 3 2017

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

commit 523c40fa8b9b0cf09848557f280bb740b8e0fc6f
Author: Xu Xing <xing.xu@intel.com>
Date: Thu Aug 03 01:33:45 2017

Remove grandparent ResourceProvider related cases

In layer compositor and display compositor, only child ResourceProvider and
parent ResourceProvider are used. No grandparent ResourceProvider is being
used in real world except this unittests.

To align with the layer tree ResourceProvider and display ResourceProvider,
remove these grandparent related cases.

BUG= 738190 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I31c4569885a2392d6925967d6db56ac9a3d78e58
Reviewed-on: https://chromium-review.googlesource.com/595115
Commit-Queue: Xing Xu <xing.xu@intel.com>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491599}
[modify] https://crrev.com/523c40fa8b9b0cf09848557f280bb740b8e0fc6f/cc/resources/resource_provider_unittest.cc

Cc: weiliangc@chromium.org
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 22 2017

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

commit b57edf32f099f437e5c10ddcaa9b54b3898df63f
Author: Xu Xing <xing.xu@intel.com>
Date: Tue Aug 22 04:18:47 2017

Split ResourceProvider into LayerTreeResourceProvider and DisplayResourceProvider

ResourceProvider manages resources shared between producer (render layer tree, browser
layer tree) and consumer (display compositor). The producer writes to resources and
sends it to the consumer, the consumer receives and reads resources. These write/send
and receive/read currently live in a single ResourceProvider. The general idea is to
split the responsibilities in ResourceProvider into two parts: write/send in the
LayerTreeResourceProvider, receive/read in the DisplayResourceProvider.

After investigating the write/read in producer and consumer (list in below table:
https://docs.google.com/spreadsheets/d/1lnyONBganHkiQKw8J-3e3xC7STZkYvSh7dkzxSUFmPw/edit),
most of these Scoped*s are used by both the producer and consumer. So in this patch,
will split send into LayerTreeResourceProvider and receive into DisplayResourceProvider
first.

TODO: split read/write in ResourceProvider into LayerTreeResourceProvider or
DisplayResourceProvider, related bug is 
https://bugs.chromium.org/p/chromium/issues/detail?id=757291

BUG= 738190 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ifc686fbd234f325228a8de0c6270500fc1b22fe2
Reviewed-on: https://chromium-review.googlesource.com/599628
Commit-Queue: Xing Xu <xing.xu@intel.com>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496211}
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/BUILD.gn
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/layers/texture_layer_unittest.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/direct_renderer.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/direct_renderer.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_candidate.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_candidate.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_processor.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_processor.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_strategy_fullscreen.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_strategy_fullscreen.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_strategy_single_on_top.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_strategy_single_on_top.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_strategy_underlay.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_strategy_underlay.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_strategy_underlay_cast.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_strategy_underlay_cast.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/overlay_unittest.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/software_renderer.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/software_renderer.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/output/software_renderer_unittest.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/raster/bitmap_raster_buffer_provider.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/raster/bitmap_raster_buffer_provider.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/raster/gpu_raster_buffer_provider.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/raster/gpu_raster_buffer_provider.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/raster/one_copy_raster_buffer_provider.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/raster/one_copy_raster_buffer_provider.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/raster/raster_buffer_provider_perftest.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/raster/raster_buffer_provider_unittest.cc
[add] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/resources/display_resource_provider.cc
[add] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/resources/display_resource_provider.h
[add] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/resources/layer_tree_resource_provider.cc
[add] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/resources/resource_provider.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/resources/resource_provider.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/test/fake_resource_provider.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/test/layer_tree_pixel_resource_test.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/test/pixel_test.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/test/pixel_test.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/tiles/picture_layer_tiling_set_unittest.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/trees/layer_tree_host_impl.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/trees/layer_tree_host_unittest_context.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/trees/layer_tree_impl.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/cc/trees/layer_tree_impl.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/display.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/display.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/gl_renderer.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/skia_renderer.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/skia_renderer.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/surface_aggregator.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/surface_aggregator.h
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/surface_aggregator_perftest.cc
[modify] https://crrev.com/b57edf32f099f437e5c10ddcaa9b54b3898df63f/components/viz/service/display/surface_aggregator_unittest.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Aug 29 2017

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

commit 125dac9301be85df1659587f853bac991cb08f48
Author: Xu Xing <xing.xu@intel.com>
Date: Tue Aug 29 02:01:14 2017

Remove child related code in LayerTreeResourceProvider

For the LayerTree-Display ResouceProvider, no child in the LayerTreeResourceProvider.
Child is a Display concept.

BUG= 738190 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie8f56f63cf5c73ac668eb36d29165c332e8aea39
Reviewed-on: https://chromium-review.googlesource.com/636850
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Xing Xu <xing.xu@intel.com>
Cr-Commit-Position: refs/heads/master@{#497983}
[modify] https://crrev.com/125dac9301be85df1659587f853bac991cb08f48/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/125dac9301be85df1659587f853bac991cb08f48/cc/resources/layer_tree_resource_provider.cc

Comment 17 by xing...@intel.com, Sep 1 2017

Blockedon: 757291

Comment 18 by xing...@intel.com, Sep 1 2017

Blockedon: 761243
Project Member

Comment 19 by bugdroid1@chromium.org, Sep 1 2017

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

commit 9208bbf3bdeb9123e028faf9fcae6e01aea3a6f7
Author: Xu Xing <xing.xu@intel.com>
Date: Fri Sep 01 18:23:57 2017

viz: Move child and read related code of ResourceProvider into Display

All children are created and managed by DisplayResourceProvider. So move
the child related code into it.

As the resource's consumer, DisplayResourceProvider reads resources, 
LayerTreeResourceProvider has little to do with read. So 
move LockForRead and UnlockForRead into DisplayResourceProvider.

BUG= 738190 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iac7f337dcb2171e91c0c5cb6f4a9e051d77ba362
Reviewed-on: https://chromium-review.googlesource.com/644857
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Xing Xu <xing.xu@intel.com>
Cr-Commit-Position: refs/heads/master@{#499236}
[modify] https://crrev.com/9208bbf3bdeb9123e028faf9fcae6e01aea3a6f7/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/9208bbf3bdeb9123e028faf9fcae6e01aea3a6f7/cc/resources/display_resource_provider.h
[modify] https://crrev.com/9208bbf3bdeb9123e028faf9fcae6e01aea3a6f7/cc/resources/resource_provider.cc
[modify] https://crrev.com/9208bbf3bdeb9123e028faf9fcae6e01aea3a6f7/cc/resources/resource_provider.h
[modify] https://crrev.com/9208bbf3bdeb9123e028faf9fcae6e01aea3a6f7/cc/resources/resource_provider_unittest.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Sep 25 2017

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

commit cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a
Author: danakj <danakj@chromium.org>
Date: Mon Sep 25 18:33:47 2017

Remove cc::BlockingTaskRunner and cc::ReleaseCallbackImpl

BlockingTaskRunner was introduced in order for resources released by
a commit to be returned from the impl thread back to the main thread
(ie have the main thread ReleaseCallback run) before the commit ended.
This allowed cc clients to reuse textures immediately upon commit
ending, allowing for less buffering.

With the implementation of delgated compositing, the value of
BlockingTaskRunner disppeared. Now the cases where the impl thread has
a reference to return to the main thread during commit are very few.
The only one that appeared in cc unittests was:
- Make a layer undrawable (sized 0x0)
- Set a mailbox, commit
- Remove the layer from the tree, dropping the impl thread ref.
- Expect to see mailbox returned inside the commit that removes
  the layer from the tree.

Another case would be a texture layer which is not part of the
on-screen frame. But as soon as the layer became visible, committing
a mailbox would mean by the time the next commit happend, the mailbox
has been sent to the display compositor and *can't* be returned. If
unused in the next frame, the display compositor will return it async
outside of commit, and we'll forward it to the main thread.

So the main thread always needs extra buffering for on-screen texture
layers now. By removing the complexity introduced by BlockingTaskRunner
we will make a cc client animating a texture layer outside the
viewport require extra an extra texture of buffering, just as it would
need once it's in the viewport. So the memory overhead shouldn't be
impactful - offscreen clients shouldn't be animating textures, and we'd
need to allocate another texture as soon as they became visible anyway.

Another concern is that on shutdown/removal from the tree, the
resources should all be returned before the commit ends, so the client
can destroy its own structures immediately. This is no longer the case
with delegated rendering and any clients depending on this have already
been leaking in the common case (layer on screen, and can be drawn).

Removing this class will greatly simplify the effort to split
ResourceProvider into two classes - to service the layer and the
display compositors separately, as there's no BlockingTaskRunner
in DisplayResourceProvider anymoore, which was a layer-tree concept.

R=piman@chromium.org

Bug:  738190 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I5d9ffe70e245cdc763f6672c0e8c561f9992de0c
Reviewed-on: https://chromium-review.googlesource.com/679481
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504110}
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/BUILD.gn
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/layers/texture_layer.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/layers/texture_layer.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/layers/texture_layer_impl.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/layers/texture_layer_impl.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/layers/texture_layer_impl_unittest.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/layers/texture_layer_unittest.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/layers/video_layer_impl.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/layers/video_layer_impl.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/display_resource_provider.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/layer_tree_resource_provider.h
[delete] https://crrev.com/9ff85175e60bca93513c83c25597fe799be76601/cc/resources/release_callback_impl.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/resource_provider.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/resource_provider.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/return_callback.h
[delete] https://crrev.com/9ff85175e60bca93513c83c25597fe799be76601/cc/resources/single_release_callback_impl.cc
[delete] https://crrev.com/9ff85175e60bca93513c83c25597fe799be76601/cc/resources/single_release_callback_impl.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/video_resource_updater.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/video_resource_updater.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/resources/video_resource_updater_unittest.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/test/fake_resource_provider.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/test/pixel_test.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/test/pixel_test.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/test/render_pass_test_utils.cc
[delete] https://crrev.com/9ff85175e60bca93513c83c25597fe799be76601/cc/trees/blocking_task_runner.cc
[delete] https://crrev.com/9ff85175e60bca93513c83c25597fe799be76601/cc/trees/blocking_task_runner.h
[delete] https://crrev.com/9ff85175e60bca93513c83c25597fe799be76601/cc/trees/blocking_task_runner_unittest.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/trees/proxy_main.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/trees/single_thread_proxy.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/trees/single_thread_proxy.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/trees/task_runner_provider.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/cc/trees/task_runner_provider.h
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/components/viz/service/display/display.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/components/viz/service/display/overlay_unittest.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/components/viz/service/display/surface_aggregator.cc
[modify] https://crrev.com/cde8e4c393b5518ec2acd2b2c15dd5dfa8f3b94a/components/viz/service/display/surface_aggregator.h

Blockedon: 769423
Project Member

Comment 22 by bugdroid1@chromium.org, Oct 12 2017

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

commit 1b3341e4419ad706ddc3386b5f8b499cfbf119c2
Author: Xu Xing <xing.xu@intel.com>
Date: Thu Oct 12 03:17:08 2017

Remove delegated_sync_points_required in Display

delegated_sync_points_required is only used in LayerTree.

BUG= 738190 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ib53c94930fbba5007a99398be8a6e0f62323f357
Reviewed-on: https://chromium-review.googlesource.com/711161
Commit-Queue: Xing Xu <xing.xu@intel.com>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508241}
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/raster/raster_buffer_provider_perftest.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/raster/raster_buffer_provider_unittest.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/resources/display_resource_provider.h
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/test/fake_resource_provider.h
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/test/pixel_test.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/tiles/picture_layer_tiling_set_unittest.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/cc/trees/layer_tree_host_unittest_context.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/components/viz/service/display/display.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/components/viz/service/display/overlay_unittest.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/components/viz/service/display/software_renderer_unittest.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/components/viz/service/display/surface_aggregator_perftest.cc
[modify] https://crrev.com/1b3341e4419ad706ddc3386b5f8b499cfbf119c2/components/viz/service/display/surface_aggregator_unittest.cc

Comment 23 by xing...@intel.com, Nov 7 2017

Blockedon: 782044
Project Member

Comment 24 by bugdroid1@chromium.org, Nov 7 2017

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

commit dfc8eeec8e197316e831a4e2489d8077d63766be
Author: Xu Xing <xing.xu@intel.com>
Date: Tue Nov 07 02:07:09 2017

viz: Move TextureToStorageFormat into util

This will be used by local resources.

BUG= 738190 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I7e63f0d893b6ef23d38ca8b839c0caecd8295c59
Reviewed-on: https://chromium-review.googlesource.com/753002
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Xing Xu <xing.xu@intel.com>
Cr-Commit-Position: refs/heads/master@{#514353}
[modify] https://crrev.com/dfc8eeec8e197316e831a4e2489d8077d63766be/cc/resources/resource_provider.cc
[modify] https://crrev.com/dfc8eeec8e197316e831a4e2489d8077d63766be/components/viz/common/resources/resource_format_utils.cc
[modify] https://crrev.com/dfc8eeec8e197316e831a4e2489d8077d63766be/components/viz/common/resources/resource_format_utils.h

Project Member

Comment 25 by bugdroid1@chromium.org, Nov 8 2017

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

commit 44e65794bf7bf1e5c2d3e6997aed433e8157ce13
Author: danakj <danakj@chromium.org>
Date: Wed Nov 08 23:49:02 2017

Move cc::ResourceProvider::Resource to viz::internal::RemotableResource

This moves the nested class ResourceProvider::Resource to the viz
common library. It is not meant for general use so it goes in the
viz::internal:: namespace. We name it RemotableResource to explain
that its for resources that can be shared between client and service,
which eliminates the name duplication between ResourceProvider::Resource
and cc::Resource.

The internal RemotableResource needs access to two enums that were
part of ResourceProvider directly before, as they are part of the
public ResourceProvider API, so we move them into separate enums in
viz common with the RemotableResource prefix.

R=piman@chromium.org

Bug:  738190 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I7cbce9596cab6ba32bb95270d647498fca0fde79
Reviewed-on: https://chromium-review.googlesource.com/683242
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515011}
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/layers/heads_up_display_layer_impl.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/layers/texture_layer_impl.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/raster/raster_buffer_provider_perftest.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/raster/raster_buffer_provider_unittest.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/display_resource_provider.h
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/resource_pool.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/resource_pool.h
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/resource_pool_unittest.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/resource_provider.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/resource_provider.h
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/scoped_resource.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/scoped_resource.h
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/scoped_resource_unittest.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/resources/video_resource_updater.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/test/fake_picture_layer_tiling_client.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/test/fake_ui_resource_layer_tree_host_impl.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/test/layer_tree_pixel_resource_test.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/test/render_pass_test_utils.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/common/BUILD.gn
[add] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/common/resources/resource.cc
[add] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/common/resources/resource.h
[add] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/common/resources/resource_fence.h
[add] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/common/resources/resource_texture_hint.h
[add] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/common/resources/resource_type.h
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/service/display/direct_renderer.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/service/display/direct_renderer.h
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/service/display/skia_renderer.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/service/display/software_renderer.cc
[modify] https://crrev.com/44e65794bf7bf1e5c2d3e6997aed433e8157ce13/components/viz/service/display/software_renderer_unittest.cc

Project Member

Comment 26 by bugdroid1@chromium.org, Nov 9 2017

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

commit 43d70d5dd490d5bf146cbb35c79a53edcbdf3a25
Author: danakj <danakj@chromium.org>
Date: Thu Nov 09 01:12:34 2017

When calling UseRenderPass() to restore, ensure it runs.

UseRenderPass() has two use cases, either to set up a render pass
as the framebuffer for drawing at the start of the draw, or to restore
us back to that state after making some intermediate change to which
framebuffer is bound.

UseRenderPass() has some optimizations where it can return false and
not do anything, if it detects that we don't want to draw the render
pass. The first use case, in DrawRenderPass() makes use of this return
value to avoid drawing anything.

Other callers to UseRenderPass() do not check the return value because
we're already drawing the pass and they are trying to restore state. If
it early outs for these it would be unexpected and produce bugs.

Currently DecideRenderPassAllocationsForFrame modifies render passes to
try avoid such bugs, but there are other ways to encounter the bug.

This changes UseRenderPass() to never early out so the latter cases will
not avoid resetting the framebuffer. The former case can avoid
UseRenderPass() entirely by checking CanSkipRenderPass(). If it is true,
then it does not need to be drawn.

Also, we will now ensure that UseRenderPass() is called after using a
ScopedUseGrContext when drawing a RenderPassDrawQuad. Currently on errors
it would early out before restoring the framebuffer, which could cause
bugs for the next quads in the RenderPass. This was introduced when the
UseRenderPass() call was moved out of the ~ScopedUseGrContext()
destructor in https://codereview.chromium.org/2203033005.

This all came up via https://chromium-review.googlesource.com/c/chromium/src/+/757027#message-b6e905925e834419ff448e2093a392053d5d321a

R=enne@chromium.org, wutao@chromium.org

Bug:  782044 ,  738190 , 782042
Change-Id: Ib4662c5fee3f326642add12bbfe3d51e51dff1c9
Reviewed-on: https://chromium-review.googlesource.com/757049
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515043}
[modify] https://crrev.com/43d70d5dd490d5bf146cbb35c79a53edcbdf3a25/components/viz/service/display/direct_renderer.cc
[modify] https://crrev.com/43d70d5dd490d5bf146cbb35c79a53edcbdf3a25/components/viz/service/display/direct_renderer.h
[modify] https://crrev.com/43d70d5dd490d5bf146cbb35c79a53edcbdf3a25/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/43d70d5dd490d5bf146cbb35c79a53edcbdf3a25/components/viz/service/display/gl_renderer.h
[modify] https://crrev.com/43d70d5dd490d5bf146cbb35c79a53edcbdf3a25/components/viz/service/display/skia_renderer.cc
[modify] https://crrev.com/43d70d5dd490d5bf146cbb35c79a53edcbdf3a25/components/viz/service/display/skia_renderer.h
[modify] https://crrev.com/43d70d5dd490d5bf146cbb35c79a53edcbdf3a25/components/viz/service/display/software_renderer.cc
[modify] https://crrev.com/43d70d5dd490d5bf146cbb35c79a53edcbdf3a25/components/viz/service/display/software_renderer.h

Project Member

Comment 27 by bugdroid1@chromium.org, Nov 9 2017

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

commit 6dcd9ac14c9e5fbb60c659143b40bcc54309486e
Author: Ned Nguyen <nednguyen@google.com>
Date: Thu Nov 09 16:08:22 2017

Revert "When calling UseRenderPass() to restore, ensure it runs."

This reverts commit 43d70d5dd490d5bf146cbb35c79a53edcbdf3a25.

Reason for revert: cause system_health.memory_desktop.browse:media:youtube to crash

(BUG:783198)

Original change's description:
> When calling UseRenderPass() to restore, ensure it runs.
> 
> UseRenderPass() has two use cases, either to set up a render pass
> as the framebuffer for drawing at the start of the draw, or to restore
> us back to that state after making some intermediate change to which
> framebuffer is bound.
> 
> UseRenderPass() has some optimizations where it can return false and
> not do anything, if it detects that we don't want to draw the render
> pass. The first use case, in DrawRenderPass() makes use of this return
> value to avoid drawing anything.
> 
> Other callers to UseRenderPass() do not check the return value because
> we're already drawing the pass and they are trying to restore state. If
> it early outs for these it would be unexpected and produce bugs.
> 
> Currently DecideRenderPassAllocationsForFrame modifies render passes to
> try avoid such bugs, but there are other ways to encounter the bug.
> 
> This changes UseRenderPass() to never early out so the latter cases will
> not avoid resetting the framebuffer. The former case can avoid
> UseRenderPass() entirely by checking CanSkipRenderPass(). If it is true,
> then it does not need to be drawn.
> 
> Also, we will now ensure that UseRenderPass() is called after using a
> ScopedUseGrContext when drawing a RenderPassDrawQuad. Currently on errors
> it would early out before restoring the framebuffer, which could cause
> bugs for the next quads in the RenderPass. This was introduced when the
> UseRenderPass() call was moved out of the ~ScopedUseGrContext()
> destructor in https://codereview.chromium.org/2203033005.
> 
> This all came up via https://chromium-review.googlesource.com/c/chromium/src/+/757027#message-b6e905925e834419ff448e2093a392053d5d321a
> 
> R=​enne@chromium.org, wutao@chromium.org
> 
> Bug:  782044 ,  738190 , 782042
> Change-Id: Ib4662c5fee3f326642add12bbfe3d51e51dff1c9
> Reviewed-on: https://chromium-review.googlesource.com/757049
> Commit-Queue: danakj <danakj@chromium.org>
> Reviewed-by: enne <enne@chromium.org>
> Reviewed-by: Tao Wu <wutao@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#515043}

TBR=danakj@chromium.org,enne@chromium.org,wutao@chromium.org

Change-Id: I2acd86c21290c053b1801732599c1ab355161469
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  782044 ,  738190 , 782042
Reviewed-on: https://chromium-review.googlesource.com/760557
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#515178}
[modify] https://crrev.com/6dcd9ac14c9e5fbb60c659143b40bcc54309486e/components/viz/service/display/direct_renderer.cc
[modify] https://crrev.com/6dcd9ac14c9e5fbb60c659143b40bcc54309486e/components/viz/service/display/direct_renderer.h
[modify] https://crrev.com/6dcd9ac14c9e5fbb60c659143b40bcc54309486e/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/6dcd9ac14c9e5fbb60c659143b40bcc54309486e/components/viz/service/display/gl_renderer.h
[modify] https://crrev.com/6dcd9ac14c9e5fbb60c659143b40bcc54309486e/components/viz/service/display/skia_renderer.cc
[modify] https://crrev.com/6dcd9ac14c9e5fbb60c659143b40bcc54309486e/components/viz/service/display/skia_renderer.h
[modify] https://crrev.com/6dcd9ac14c9e5fbb60c659143b40bcc54309486e/components/viz/service/display/software_renderer.cc
[modify] https://crrev.com/6dcd9ac14c9e5fbb60c659143b40bcc54309486e/components/viz/service/display/software_renderer.h

Project Member

Comment 28 by bugdroid1@chromium.org, Nov 10 2017

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

commit 986d87a5fada7910886f1fc07e592c7698da128f
Author: danakj <danakj@chromium.org>
Date: Fri Nov 10 19:30:54 2017

When calling UseRenderPass() to restore, ensure it runs.

UseRenderPass() has two use cases, either to set up a render pass
as the framebuffer for drawing at the start of the draw, or to restore
us back to that state after making some intermediate change to which
framebuffer is bound.

UseRenderPass() has some optimizations where it can return false and
not do anything, if it detects that we don't want to draw the render
pass. The first use case, in DrawRenderPass() makes use of this return
value to avoid drawing anything.

Other callers to UseRenderPass() do not check the return value because
we're already drawing the pass and they are trying to restore state. If
it early outs for these it would be unexpected and produce bugs.

Currently DecideRenderPassAllocationsForFrame modifies render passes to
try avoid such bugs, but there are other ways to encounter the bug.

This changes UseRenderPass() to never early out so the latter cases will
not avoid resetting the framebuffer. The former case can avoid
UseRenderPass() entirely by checking CanSkipRenderPass(). If it is true,
then it does not need to be drawn.

Also, we will now ensure that UseRenderPass() is called after using a
ScopedUseGrContext when drawing a RenderPassDrawQuad. Currently on errors
it would early out before restoring the framebuffer, which could cause
bugs for the next quads in the RenderPass. This was introduced when the
UseRenderPass() call was moved out of the ~ScopedUseGrContext()
destructor in https://codereview.chromium.org/2203033005.

When skipping a RenderPass, current_render_pass is no longer set, which
causes a crash in code that assumes it is, incorrectly. So this updates
some paths in RenderPassDrawQuad drawing to avoid crashing, by passing
the colorspace directly instead of trying to pull it off
current_render_pass, since the caller knows where to find the correct
one, and by using the root_render_pass instead for copying
RenderPassDrawQuads to textures, since they draw into the root.

This all came up via https://chromium-review.googlesource.com/c/chromium/src/+/757027#message-b6e905925e834419ff448e2093a392053d5d321a

R=enne@chromium.org, wutao@chromium.org

Bug:  782044 ,  738190 , 782042,  783087 
Change-Id: I62ea68be6b3008ec8b8370466db0e26321f022f9
Reviewed-on: https://chromium-review.googlesource.com/760558
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: ccameron <ccameron@chromium.org>
Reviewed-by: Tao Wu <wutao@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515633}
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/direct_renderer.cc
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/direct_renderer.h
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/gl_renderer.h
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/skia_renderer.cc
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/skia_renderer.h
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/software_renderer.cc
[modify] https://crrev.com/986d87a5fada7910886f1fc07e592c7698da128f/components/viz/service/display/software_renderer.h

Project Member

Comment 29 by bugdroid1@chromium.org, Nov 11 2017

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

commit bd829cadf22696834edf4aefc9033f5c8e272183
Author: danakj <danakj@chromium.org>
Date: Sat Nov 11 00:19:32 2017

Remove caching avoidance when there is a non-empty scissor.

See https://chromium-review.googlesource.com/c/chromium/src/+/760558#message-83efb689457770dfabb6d7371847f06f8091dfd7
and https://bugs.chromium.org/p/chromium/issues/detail?id=783087#c24
for explanations, but tl;dr this check would break caching, and
shouldn't be there. Before it was used to skip render passes
regardless of caching, but incorrectly, and the unittest in
https://chromium-review.googlesource.com/c/chromium/src/+/760558
demonstrates that, and fails with that check.

This removes the check from the caching block.

R=enne@chromium.org, wutao@chromium.org

Bug:  782044 ,  738190 , 782042,  783087 
Change-Id: Idc5baea6da5e6d663da9c1aa23ce81a55e61168d
Reviewed-on: https://chromium-review.googlesource.com/763710
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Tao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515757}
[modify] https://crrev.com/bd829cadf22696834edf4aefc9033f5c8e272183/components/viz/service/display/direct_renderer.cc
[modify] https://crrev.com/bd829cadf22696834edf4aefc9033f5c8e272183/components/viz/service/display/gl_renderer_unittest.cc

Comment 30 by xing...@intel.com, Dec 8 2017

Blockedon: 793211

Comment 31 by xing...@intel.com, Dec 8 2017

Blockedon: 793212

Comment 32 by xing...@intel.com, Dec 11 2017

Blockedon: -793211
Project Member

Comment 33 by bugdroid1@chromium.org, Dec 15 2017

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

commit 249dc2fe982d665760b5acfafb6b9eb62d0acd1f
Author: danakj <danakj@chromium.org>
Date: Fri Dec 15 21:46:32 2017

Don't use ResourceProvider to make bitmaps in SoftwareRenderer

The SoftwareRenderer doesn't need to share those bitmaps out of process
so it can just make regular SkBitmaps and use those, without depending
on ResourceProvider, ResourceIds, SharedBitmapManager, etc to get that
done.

R=kylechar@chromium.org

Bug:  730660 ,  738190 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ie49389776441efe3faddb7ecf364126e5cc44170
Reviewed-on: https://chromium-review.googlesource.com/828081
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524472}
[modify] https://crrev.com/249dc2fe982d665760b5acfafb6b9eb62d0acd1f/components/viz/service/display/direct_renderer.cc
[modify] https://crrev.com/249dc2fe982d665760b5acfafb6b9eb62d0acd1f/components/viz/service/display/direct_renderer.h
[modify] https://crrev.com/249dc2fe982d665760b5acfafb6b9eb62d0acd1f/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/249dc2fe982d665760b5acfafb6b9eb62d0acd1f/components/viz/service/display/gl_renderer.h
[modify] https://crrev.com/249dc2fe982d665760b5acfafb6b9eb62d0acd1f/components/viz/service/display/skia_renderer.cc
[modify] https://crrev.com/249dc2fe982d665760b5acfafb6b9eb62d0acd1f/components/viz/service/display/skia_renderer.h
[modify] https://crrev.com/249dc2fe982d665760b5acfafb6b9eb62d0acd1f/components/viz/service/display/software_renderer.cc
[modify] https://crrev.com/249dc2fe982d665760b5acfafb6b9eb62d0acd1f/components/viz/service/display/software_renderer.h

Project Member

Comment 34 by bugdroid1@chromium.org, Dec 22 2017

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

commit 66a412029b38571c2f6df457d2e9d2799b55e050
Author: danakj <danakj@chromium.org>
Date: Fri Dec 22 20:59:27 2017

viz: Simplify ScopedRenderPassTexture interactions.

Pass in the ContextProvider instead of each capability individually. And in the
DirectRenderer classes, the FrameBuffer hint is always used so stop making it
conditional (this is a leftover from ResourceProvider code this was based on)
and just pass mipmap as a bool so that new bitflags can't be added without
child classes knowing about it. Last, pass RenderPassRequirements consistently
to both methods that receive them, instead of unpacking it for one of them, so
that the relationship is more clear in the APIs.

R=piman@chromium.org

Bug:  738190 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ie53c2041183207561efae7d10c0c32e42daf1bd2
Reviewed-on: https://chromium-review.googlesource.com/843162
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526059}
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/direct_renderer.cc
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/direct_renderer.h
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/gl_renderer.h
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/scoped_render_pass_texture.cc
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/scoped_render_pass_texture.h
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/skia_renderer.cc
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/skia_renderer.h
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/software_renderer.cc
[modify] https://crrev.com/66a412029b38571c2f6df457d2e9d2799b55e050/components/viz/service/display/software_renderer.h

Project Member

Comment 35 by bugdroid1@chromium.org, Jan 4 2018

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

commit 52e1d55c1ef39797050456f93ca6681ada56fb63
Author: danakj <danakj@chromium.org>
Date: Thu Jan 04 01:39:21 2018

Replace use of ResourcePool with owned ScopedGpuMemoryBufferTexture

ResourcePool makes uses of creating resources on ResourceProvider, which is
a functionality of LayerTreeResourceProvider (ie compositor clients). We
replace it with 3 vectors in GLRenderer, and ScopedGpuMemoryBufferTexture,
of which ownership is moved through those vectors.

ScopedGpuMemoryBufferTexture allocates a texture backed by an image +
GpuMemoryBuffer, so that it can be used as an overlay. The first vector
is the set of in-flight textures. Once SwapBuffersComplete happens, we
move them to a set awaiting release from CA. Then on signal from CA we
recycle them back into the available set.

R=ccameron@chromium.org

Bug:  730660 ,  738190 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I24efe515b69aaa7ec30d7163f28a66f96c3562c0
Reviewed-on: https://chromium-review.googlesource.com/843127
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526892}
[modify] https://crrev.com/52e1d55c1ef39797050456f93ca6681ada56fb63/cc/resources/resource_provider.cc
[modify] https://crrev.com/52e1d55c1ef39797050456f93ca6681ada56fb63/components/viz/service/BUILD.gn
[modify] https://crrev.com/52e1d55c1ef39797050456f93ca6681ada56fb63/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/52e1d55c1ef39797050456f93ca6681ada56fb63/components/viz/service/display/gl_renderer.h
[modify] https://crrev.com/52e1d55c1ef39797050456f93ca6681ada56fb63/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/52e1d55c1ef39797050456f93ca6681ada56fb63/components/viz/service/display/overlay_unittest.cc
[add] https://crrev.com/52e1d55c1ef39797050456f93ca6681ada56fb63/components/viz/service/display/scoped_gpu_memory_buffer_texture.cc
[add] https://crrev.com/52e1d55c1ef39797050456f93ca6681ada56fb63/components/viz/service/display/scoped_gpu_memory_buffer_texture.h

Project Member

Comment 36 by bugdroid1@chromium.org, Jan 5 2018

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

commit ee1b38ee2e5b4d2c086e6cd27dc679ca7a3cd87f
Author: danakj <danakj@chromium.org>
Date: Fri Jan 05 21:11:19 2018

cc: Remove GetTextureHint() from ResourceProvider.

The hint is used for making resources, but is not used after, and is
not part of imported resources. As we transition toward using those,
this method will not work. Also it's not used today.

R=kylechar@chromium.org

Bug:  730660 ,  738190 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I7d52b48ee2ed47e6f5644236ab2953d8af2f4ee7
Reviewed-on: https://chromium-review.googlesource.com/852696
Reviewed-by: kylechar <kylechar@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527381}
[modify] https://crrev.com/ee1b38ee2e5b4d2c086e6cd27dc679ca7a3cd87f/cc/resources/resource_provider.cc
[modify] https://crrev.com/ee1b38ee2e5b4d2c086e6cd27dc679ca7a3cd87f/cc/resources/resource_provider.h

Project Member

Comment 37 by bugdroid1@chromium.org, Jan 17 2018

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

commit cee57c9cec9cb42cee7e57c44cc3a594913472c3
Author: Xu Xing <xing.xu@intel.com>
Date: Wed Jan 17 07:51:28 2018

[viz] Move DeleteResource and SynchronousFence to LayerTree and Display

DeleteResource into LayerTree. SynchronousFence and ReadLockFenceHasPassed into Display.

BUG= 738190 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Icb174122c37122a56024a16ab3a89fc3d52d10e2
Reviewed-on: https://chromium-review.googlesource.com/866157
Commit-Queue: Xing Xu <xing.xu@intel.com>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529670}
[modify] https://crrev.com/cee57c9cec9cb42cee7e57c44cc3a594913472c3/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/cee57c9cec9cb42cee7e57c44cc3a594913472c3/cc/resources/display_resource_provider.h
[modify] https://crrev.com/cee57c9cec9cb42cee7e57c44cc3a594913472c3/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/cee57c9cec9cb42cee7e57c44cc3a594913472c3/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/cee57c9cec9cb42cee7e57c44cc3a594913472c3/cc/resources/resource_provider.cc
[modify] https://crrev.com/cee57c9cec9cb42cee7e57c44cc3a594913472c3/cc/resources/resource_provider.h
[modify] https://crrev.com/cee57c9cec9cb42cee7e57c44cc3a594913472c3/components/viz/service/display/gl_renderer.cc
[modify] https://crrev.com/cee57c9cec9cb42cee7e57c44cc3a594913472c3/components/viz/service/display/skia_renderer.cc

Project Member

Comment 38 by bugdroid1@chromium.org, Jan 19 2018

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

commit e660f4854687cdcdfae3f10b5ff9958ddfa79d0d
Author: Xu Xing <xing.xu@intel.com>
Date: Fri Jan 19 02:33:19 2018

[viz] Move promotion hints and misc to Display and LayerTree

batched_returning_resources_, wants_promotion_hints_set_ to Display.
IsLost, LoseResourceForTesting, EnableReadLockFencesForTesting to LayerTree.

BUG= 738190 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I01fce2d63aee57eccaced8a596869fa380f69bf7
Reviewed-on: https://chromium-review.googlesource.com/870173
Commit-Queue: Xing Xu <xing.xu@intel.com>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530398}
[modify] https://crrev.com/e660f4854687cdcdfae3f10b5ff9958ddfa79d0d/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/e660f4854687cdcdfae3f10b5ff9958ddfa79d0d/cc/resources/display_resource_provider.h
[modify] https://crrev.com/e660f4854687cdcdfae3f10b5ff9958ddfa79d0d/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/e660f4854687cdcdfae3f10b5ff9958ddfa79d0d/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/e660f4854687cdcdfae3f10b5ff9958ddfa79d0d/cc/resources/resource_provider.cc
[modify] https://crrev.com/e660f4854687cdcdfae3f10b5ff9958ddfa79d0d/cc/resources/resource_provider.h

Blockedon: 804041
Project Member

Comment 40 by bugdroid1@chromium.org, Feb 6 2018

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

commit bd63605c0b5cbcd45dd8320143b2d511f3112995
Author: danakj <danakj@chromium.org>
Date: Tue Feb 06 18:28:49 2018

Move ownership of ResourcePool zero-copy resources to buffer provider

This adds a GpuBacking object to PoolResource, which holds ownership
of all the GpuMemoryBuffer-based backing objects. The
ZeroCopyRasterBufferImpl has a subclass with its own specific types
in it, and populates them:
a) When AcquireBufferForRaster is called it creates the GpuBacking
and ensures the sync token is waited on if present.
b) When the RasterBuffer is destroyed, back on the compositor thread,
it binds the GpuMemoryBuffer to a mailbox, and stores those onto the
GpuBacking.

Then ResourcePool can export the GpuBacking by reading the mailbox
of it. And when the resource is destroyed, the GpuBacking cleans
up the ownership of the mailboxed texture and GpuMemoryBuffer.

R=vmpstr@chromium.org

Bug:  730660 ,  738190 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Iac964108e2ab767239e9968e03f82bc80d6a6e3b
Reviewed-on: https://chromium-review.googlesource.com/888844
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534726}
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/layers/texture_layer_impl.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/layers/texture_layer_unittest.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/raster/raster_buffer_provider_perftest.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/raster/raster_buffer_provider_unittest.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/raster/zero_copy_raster_buffer_provider.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/raster/zero_copy_raster_buffer_provider.h
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/resources/layer_tree_resource_provider_unittest.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/resources/resource_pool.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/resources/resource_pool.h
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/test/layer_tree_pixel_resource_test.cc
[modify] https://crrev.com/bd63605c0b5cbcd45dd8320143b2d511f3112995/cc/trees/layer_tree_host_impl.cc

Project Member

Comment 41 by bugdroid1@chromium.org, Feb 9 2018

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

commit af3170e5f40955165ffea7a5dd0d8032a9e012f5
Author: danakj <danakj@chromium.org>
Date: Fri Feb 09 17:31:58 2018

Move ownership of gpu texture resources to ResourcePool

This makes allocation of resources in OneCopyRasterBufferProvider
and GpuRasterBufferProvider happen directly instead of through
a ResourceProvider lock, and stores ownership of the resources in the
ResourcePool. For each RasterBufferProvider,
a) When AcquireBufferForRaster is called it creates the GpuBacking
and ensures the sync token is waited on if present, and creates a texture
and mailbox.
b) After playback on the worker, a sync token is created.
c) When the RasterBuffer is destroyed, back on the compositor thread,
it stores that sync token into the GpuBacking.

R=sunnyps@chromium.org, vmpstr@chromium.org

Bug:  730660 ,  738190 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ide0005262435cc4a0925766761221dc8852f0026
Reviewed-on: https://chromium-review.googlesource.com/895806
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535741}
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/raster/gpu_raster_buffer_provider.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/raster/gpu_raster_buffer_provider.h
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/raster/one_copy_raster_buffer_provider.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/raster/one_copy_raster_buffer_provider.h
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/raster/raster_buffer_provider_perftest.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/raster/raster_buffer_provider_unittest.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/raster/zero_copy_raster_buffer_provider.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/resources/resource_pool.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/resources/resource_pool.h
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/resources/resource_pool_unittest.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/test/fake_raster_buffer_provider.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/test/layer_tree_pixel_resource_test.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/tiles/tile_manager.h
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/components/viz/common/BUILD.gn
[add] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/components/viz/common/gpu/texture_allocation.cc
[add] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/components/viz/common/gpu/texture_allocation.h
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/components/viz/common/resources/resource_format_utils.cc
[modify] https://crrev.com/af3170e5f40955165ffea7a5dd0d8032a9e012f5/components/viz/common/resources/resource_format_utils.h

Project Member

Comment 42 by bugdroid1@chromium.org, Feb 15 2018

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

commit f24bd1ea1743101ebb6c2d3ab593c397ac791c55
Author: danakj <danakj@chromium.org>
Date: Thu Feb 15 18:01:11 2018

cc: Remove ScopedResource

There are no users of this left now. Only production use of owned
ResourceIds is in VideoResourceUpdater which does not use this class.

R=kylechar@chromium.org

Bug:  738190 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I56880e9bb1f95e575c2e3a030b516b29c70a8df2
Reviewed-on: https://chromium-review.googlesource.com/919869
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537065}
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/BUILD.gn
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/layers/heads_up_display_layer_impl.h
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/raster/one_copy_raster_buffer_provider.cc
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/raster/raster_buffer_provider_perftest.cc
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/raster/raster_buffer_provider_unittest.cc
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/raster/staging_buffer_pool.cc
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/resources/resource_pool.cc
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/resources/resource_pool.h
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/cc/resources/resource_pool_unittest.cc
[delete] https://crrev.com/7922f3396299eb6f6a2798ad05071df398572a97/cc/resources/scoped_resource.cc
[delete] https://crrev.com/7922f3396299eb6f6a2798ad05071df398572a97/cc/resources/scoped_resource.h
[delete] https://crrev.com/7922f3396299eb6f6a2798ad05071df398572a97/cc/resources/scoped_resource_unittest.cc
[modify] https://crrev.com/f24bd1ea1743101ebb6c2d3ab593c397ac791c55/components/viz/service/display/direct_renderer.cc

Project Member

Comment 43 by bugdroid1@chromium.org, Feb 23 2018

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

commit a721b029b31640e26db86b12f9e5fd149e19aefb
Author: danakj <danakj@chromium.org>
Date: Fri Feb 23 22:11:11 2018

cc: Give ResourcePool a unique tracing id.

There may be more than one ResourcePool in a process, so a unique id
is needed to name each resource in memory dumps. Previously it used the
id on the ResourceProvider which is unique to each layer compositor
instance. But now there are more than one ResourcePool within the same
layer compositor, as the HUD layer can have its own ResourcePool, so
invent a tracing id specifically for ResourcePool.

This also handily removes another dependency on ResourceProvider that
isn't needed for exporting resources to the display compositor.

R=enne@chromium.org

Bug:  730660 ,  738190 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I09427437427eb2ec1df6a40aa73d9624c004d0a6
Reviewed-on: https://chromium-review.googlesource.com/935423
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538916}
[modify] https://crrev.com/a721b029b31640e26db86b12f9e5fd149e19aefb/cc/resources/resource_pool.cc
[modify] https://crrev.com/a721b029b31640e26db86b12f9e5fd149e19aefb/cc/resources/resource_pool.h

Project Member

Comment 44 by bugdroid1@chromium.org, Apr 20 2018

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

commit e2c1314045b9ec07100d46c4c4902d0e852cc436
Author: danakj <danakj@chromium.org>
Date: Fri Apr 20 02:14:03 2018

cc: Remove LayerTreeResourceProvider::CreateBitmapResource

For unit tests, replace it with an ImportResource() of some arbitrary
TransferableResource. For pixel tests, use viz::bitmap_allocation to
allocate a bitmap, and SkBitmap::readPixels to populate the SharedMemory
for the resource. Then register the SharedBitmapId with the display
compositor via the SharedBitmapManager directly, and ImportResource() to
make a ResourceId pointing to the SharedBitmapId for use in DrawQuads.

R=piman@chromium.org

Bug:  730660 ,  738190 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I143996712ee6477634d728a767f9095b5be8d74c
Reviewed-on: https://chromium-review.googlesource.com/1020226
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552232}
[modify] https://crrev.com/e2c1314045b9ec07100d46c4c4902d0e852cc436/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/e2c1314045b9ec07100d46c4c4902d0e852cc436/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/e2c1314045b9ec07100d46c4c4902d0e852cc436/cc/resources/layer_tree_resource_provider_unittest.cc
[modify] https://crrev.com/e2c1314045b9ec07100d46c4c4902d0e852cc436/cc/test/pixel_test.cc
[modify] https://crrev.com/e2c1314045b9ec07100d46c4c4902d0e852cc436/cc/test/pixel_test.h
[modify] https://crrev.com/e2c1314045b9ec07100d46c4c4902d0e852cc436/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/e2c1314045b9ec07100d46c4c4902d0e852cc436/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/e2c1314045b9ec07100d46c4c4902d0e852cc436/components/viz/service/display/software_renderer_unittest.cc

Project Member

Comment 45 by bugdroid1@chromium.org, Apr 25 2018

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

commit b7e40f6dcce92549fe9c0be06efc3917e9e89a69
Author: Antoine Labour <piman@chromium.org>
Date: Wed Apr 25 00:57:00 2018

Remove LTRP::CreateGpuTextureResource callers

These are the last users of viz::internal::Resource on LTRP, replace
them with imported resources.

Bug:  738190 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iedea0ab36dfca892b25fb77c6336f88a820391d9
Reviewed-on: https://chromium-review.googlesource.com/1023159
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553403}
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/cc/resources/display_resource_provider_unittest.cc
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/cc/test/render_pass_test_utils.cc
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/cc/test/render_pass_test_utils.h
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/cc/trees/layer_tree_host_unittest.cc
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/b7e40f6dcce92549fe9c0be06efc3917e9e89a69/components/viz/service/display/renderer_pixeltest.cc

Project Member

Comment 46 by bugdroid1@chromium.org, Apr 25 2018

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

commit dc53a1b20ca89087328347d88fdd91086a634e8d
Author: Antoine Labour <piman@chromium.org>
Date: Wed Apr 25 05:08:29 2018

Remove viz::internal::Resource functionality from LTRP

It is not used any more \o/

Bug:  738190 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic0bfa65a3ed9c43ff28450c305abbf7d0a93d3a5
Reviewed-on: https://chromium-review.googlesource.com/1023160
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553453}
[modify] https://crrev.com/dc53a1b20ca89087328347d88fdd91086a634e8d/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/dc53a1b20ca89087328347d88fdd91086a634e8d/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/dc53a1b20ca89087328347d88fdd91086a634e8d/cc/resources/resource_pool_unittest.cc

Project Member

Comment 47 by bugdroid1@chromium.org, Apr 25 2018

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

commit 5432155f817024de8c82caf31e56e3a77a0f93d0
Author: Antoine Labour <piman@chromium.org>
Date: Wed Apr 25 06:05:14 2018

Remove INTERNAL viz::internal::Resources

All Resources are now always DELEGATED, so remove functionality
associated with INTERNAL resources (and Resource::Origin).

Bug:  738190 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I1edfa175dadb4a50608f03097196af11bf02144a
Reviewed-on: https://chromium-review.googlesource.com/1023377
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553462}
[modify] https://crrev.com/5432155f817024de8c82caf31e56e3a77a0f93d0/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/5432155f817024de8c82caf31e56e3a77a0f93d0/cc/resources/resource_provider.cc
[modify] https://crrev.com/5432155f817024de8c82caf31e56e3a77a0f93d0/components/viz/common/resources/resource.cc
[modify] https://crrev.com/5432155f817024de8c82caf31e56e3a77a0f93d0/components/viz/common/resources/resource.h

Project Member

Comment 48 by bugdroid1@chromium.org, Apr 25 2018

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

commit 8a7a6faffecea6156de5c164f1a12114190f865d
Author: Antoine Labour <piman@chromium.org>
Date: Wed Apr 25 06:58:21 2018

Make LayerTreeResourceProvider not derive from ResourceProvider

It doesn't use any active unctionality from it. This would let us merge
ResourceProvider into DisplayResourceProvider.

Bug:  738190 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie08c7c75e8586e239f706cd03ad632b0c4ac1c47
Reviewed-on: https://chromium-review.googlesource.com/1023378
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553474}
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/raster/staging_buffer_pool.cc
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/raster/staging_buffer_pool.h
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/resources/layer_tree_resource_provider.h
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/resources/layer_tree_resource_provider_unittest.cc
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/resources/resource_pool.cc
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/cc/trees/layer_tree_host_unittest_context.cc
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/third_party/blink/renderer/platform/graphics/video_frame_resource_provider.cc
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/third_party/blink/renderer/platform/graphics/video_frame_resource_provider.h
[modify] https://crrev.com/8a7a6faffecea6156de5c164f1a12114190f865d/third_party/blink/renderer/platform/graphics/video_frame_submitter_test.cc

Project Member

Comment 49 by bugdroid1@chromium.org, May 18 2018

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

commit 5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c
Author: danakj <danakj@chromium.org>
Date: Fri May 18 17:22:01 2018

Collapse ResourceProvider base class down into DisplayResourceProvider

Now that LayerTreeResourceProvider no longer inherits from it, we don't
need to keep ResourceProvider as a separate base class.

While doing so, remove the public vector/unordered_map aliases and
change code to write those types out explicitly.

R=piman@chromium.org
TBR=pdr

Bug:  738190 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I0beb7a2d2d1a27b7c437782f99819f0d483b0ee1
Reviewed-on: https://chromium-review.googlesource.com/1065058
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559935}
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/BUILD.gn
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/layers/nine_patch_layer_impl.h
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/layers/nine_patch_layer_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/layers/ui_resource_layer_impl.h
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/layers/ui_resource_layer_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/layers/video_layer_impl.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/raster/raster_buffer_provider.h
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/raster/raster_buffer_provider_perftest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/raster/raster_buffer_provider_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/resources/display_resource_provider.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/resources/display_resource_provider.h
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/resources/display_resource_provider_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/resources/layer_tree_resource_provider.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/resources/layer_tree_resource_provider.h
[delete] https://crrev.com/e971a43c458ab328a5a8e395adcc44e94c2ce0d2/cc/resources/resource_provider.cc
[delete] https://crrev.com/e971a43c458ab328a5a8e395adcc44e94c2ce0d2/cc/resources/resource_provider.h
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/resources/resource_provider_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/resources/video_resource_updater_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/test/pixel_test.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/test/render_pass_test_utils.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/test/render_pass_test_utils.h
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/test/resource_provider_test_utils.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/test/resource_provider_test_utils.h
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/tiles/picture_layer_tiling_set_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/components/viz/service/display/gl_renderer_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/components/viz/service/display/overlay_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/components/viz/service/display/renderer_pixeltest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/components/viz/service/display/software_renderer_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/components/viz/service/display/surface_aggregator.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/components/viz/service/frame_sinks/DEPS
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
[modify] https://crrev.com/5fe2a7a4beb2ca604f8b6446f2ee7430b36cc51c/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc

Status: Fixed (was: Started)

Sign in to add a comment