0
Commit Graph

56 Commits

Author SHA1 Message Date
Xianzhu Wang
b80701c45c Rename LayerTreeImplTestBase::AddLayer() to AddLayerInActiveTree()
The new name is symmetric with the existing AddLayerInPendingTree()
and is clearer about the intent. This is a part of the change to make
commit-to-pending-tree the default for most unit tests, to make it
possible to check IsSyncTree() when we are committing in e.g.
PictureLayerImpl::UpdateRasterSource() to prevent errors.

Change-Id: I6bbf84f3bfbe27db20e16f2bbd2d0d9d985beb00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5671061
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1322286}
2024-07-02 17:43:03 +00:00
Avi Drissman
3f7a9d89de Update copyright headers in cc/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
Bug: 1098010
Change-Id: I78fb24acd54811d52b7e9a44e6333e2fc4e3757b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3884224
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044758}
2022-09-08 20:55:42 +00:00
Xianzhu Wang
65ef1ad3db Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry
This allows blink code to use these types without needing to depend
on ui/gfx.

Split out geometry conversion functions from ui/gfx/skia_util.h into
ui/gfx/geometry/skia_conversions.h.

Split //ui/gfx:geometry_skia into //ui/gfx:gfx_skia and
//ui/gfx/geometry:geometry_skia.

This doesn't change depending code except for cc/.

Bug: 738465
Change-Id: Idb31f605386901ed4b116f6272189c18638d3292
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3200392
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
Owners-Override: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#929022}
2021-10-07 03:12:33 +00:00
Vladimir Levin
4f331b4206 viz: Rename RenderPass to CompositorRenderPass (and related types).
This patch renames RenderPass and associated types to
CompositorRenderPass to distinguish it from AggregatedRenderPass.

R=weiliangc@chromium.org, magchen@chromium.org
Bug: 1106418

Change-Id: Ia1ab7199473d960df4ea5ce715476d2c4c290a25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380730
Reviewed-by: Maggie Chen <magchen@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Martin Barbella <mbarbella@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: weiliangc <weiliangc@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803196}
2020-08-31 18:38:47 +00:00
Xianzhu Wang
66e13e0a25 Remove LayerTreeHostCommon
Split layer_tree_host_common.h/cc into several parts:
- ScrollAndScaleSet => scroll_and_scale_set.h/cc (new files)
- CalculateLayerJitter() => LayerImpl::CalculateJitter()
- CalculateDrawProperties(LayerImpl*,...) => draw_property_utils.h/cc
- CalculateDrawPropertiesForTesting() => Combined into
    UpdateDrawProperties() in layer_test_common.h/cc
- GetPropertyTrees() => property_tree_test_utils.h/cc

Split layer_tree_host_common_unittest.cc into two parts:
- property_tree_builder_unittest.cc for tests testing
  PropertyTreeBuilder
- draw_properties_unittest.cc for the rest.

TBR= # tiny passive changes in components/viz and content/renderer

Bug: 994361
Change-Id: Ic6011c5849f5fded5e91eb2d0f592edc939b5ab2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808797
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697756}
2019-09-18 20:39:12 +00:00
Xianzhu Wang
0340f14bc8 Remove LayerImplTestProperties
It was for testing at impl-side in layer tree mode.

Change-Id: I410643e14ffd85f90be2bfb5ba670a816164da2e
Bug: 994361
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1795574
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695387}
2019-09-10 23:42:19 +00:00
Xianzhu Wang
d6a62d84d8 Convert other cc impl-side unit tests into layer list mode
Bug: 994361
Change-Id: I3c11a74df88bc38ba647faa4d014e8e39d887462
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792005
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694956}
2019-09-09 22:35:36 +00:00
Xu Xing
31616b9199 cc: Rename InitializeRenderer to InitializeFrameSink
BUG=None

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ifa035eae568d9d4345f7476ee7484026a8c1aa99
Reviewed-on: https://chromium-review.googlesource.com/1116355
Commit-Queue: Xing Xu <xing.xu@intel.com>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570972}
2018-06-28 00:24:27 +00:00
danakj
b90335db6c Keep ClientResourceProvider alive forever in LayerTreeHostImpl
Instead of creating and destroying the ClientResourceProvider with
the LayerTreeFrameSink, create it once and keep it around until the
LayerTreeHostImpl is destroyed. This allows ResourceIds to remain
valid when the LayerTreeFrameSink is replaced while software
compositing (which can happen if the viz service crashes).

We add a method ShutdownAndReleaseAllResources() on
ClientResourceProvider that will release any exported resources,
marking them as lost, instead of doing so in the destructor,
so that the owner of the class can control the timing more without
needing to heap-allocate the class.

We also take away the allowance for importing a ResourceId and
not removing it before destroying the ClientResourceProvider (or
calling ShutdownAndReleaseAllResources()). Instead we have it
DCHECK() if this occurs, reporting the stack trace from where
the resource was imported. We do this because marking resources
that are not exported as lost is silly, since they were imported
they could have been removed. A bunch of unit test changes are done
to remove resources that were imported because of this.

Two unit tests that tested the case of destroying the
ClientResourceProvider while imported resources were present are
removed since it is no longer supported.

When the CompositorFrameSink is lost, the LayerTreeHostImpl loses
the ability to receive back resources it had previously exported.
We add a method ReleaseAllExportedResources() on
ClientResourceProvider to handle this case, which removes the
export count on all resources, releasing any marked for deletion
previously. When software compositing, they do not need to be
marked lost, but when gpu compositing they do since the display
compositor modifies texture metadata in order to use them. Tests
for the new method are added, as well as to verify that in
LayerTreeHostImpl, when the CompositorFrameSink is replaced, that
the ResourceIds are not kept around.

The software-resources-aren't-lost distinction is not important in
this CL, since LayerTreeHostImpl destroys all its resources
regardless when it tears down the ResourcePool and
RasterBufferProvider. However for external clients which provide a
resource through TextureLayer, the ResourceId can remain valid in
software compositing.

R=piman@chromium.org

Bug: 826886
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: I85a867c2830c31d39796ff971e01a221e5716812
Reviewed-on: https://chromium-review.googlesource.com/1083617
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565464}
2018-06-07 23:42:29 +00:00
danakj
e5805be807 Move DrawQuads to components/viz/
These classes are part of the CompositorFrame shipped over IPC to the viz service and
should be in components/viz/common. This moves all subclasses of viz::DrawQuad from
cc/quads to components/viz/common/quads, and updates headers and namespaces throughout
chromium.

TBR=jam

Bug: 722935
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ib7ce371cc78304b9147c319987d2d582f3b56978
Reviewed-on: https://chromium-review.googlesource.com/667539
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502329}
2017-09-15 19:24:55 +00:00
danakj
1a010682cc Move DrawQuad from cc/ to components/viz/
This moves the DrawQuad base class from cc/quads/ to
components/viz/common/quads/.

R=staraz@chromium.org
TBR=dcheng

Bug: 722935
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I17be9c08f65bcbec824422544ebd4e8730729695
Reviewed-on: https://chromium-review.googlesource.com/654141
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Xingyu Zhang <staraz@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500364}
2017-09-07 20:08:19 +00:00
yiyix
10141eca52 Add a new field "are_contents_opaque" To SharedQuadState
Adding a new field, are_contents_opaque, to SharedQuadState (SQS), which
is set to true if and only if all the draw quads that share the same SQS
only contains opaque content. This field will be used to determine if the
visible rect created by a particular SQS is opaque, which will be used to
occlude draw quads behind it to improve draw occulsion in the futre.

TBR=qinmin@chromium.org

TEST= Adding verification SQS::are_contents_opaque to all sqs related tests.

Bug: 672929
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I922ac85b84c5e4b39881c6f0c8e47a92802d397d
Reviewed-on: https://chromium-review.googlesource.com/585604
Commit-Queue: Yi Xu <yiyix@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499740}
2017-09-05 20:36:52 +00:00
yiyix
78ccdd9cea Use DrawQuad::needs_blending to replace opaque_rect (3)
DrawQuad::opaque_rect and DrawQuad::needs_blending are both used to compute
whether a particular DrawQuad needs blending or not. It should be sufficient
to use only needs_blending to keep track of it.

A detailed explanation and analysis can be found here:
https://docs.google.com/document/d/1kT9a-t6tVaotSVCr-J0kYALwiDLLl_UwIZJiSP39F2I

In the previous cl, all usages of opaque_rect are removed and needs_blending
are added all DrawQuad::SetNew calls:
https://chromium-review.googlesource.com/c/618020
https://chromium-review.googlesource.com/c/621545

In this cl, DrawQuad::opaque_rect is finally being removed entirely.

TBR=thakis@chromium.org

Bug: 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id057acf55f80ec6242e6e4ff9450b062114f11d4
Reviewed-on: https://chromium-review.googlesource.com/628581
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: weiliangc <weiliangc@chromium.org>
Commit-Queue: Yi Xu <yiyix@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498018}
2017-08-29 03:59:46 +00:00
danakj
c7afae5cf0 Rename cc::CompositorFrameSink to cc::LayerTreeFrameSink
Along with all associated names such as clients and subclasses.

CompositorFrameSink is the name of the mojo APIs. Now that IPC is thru
mojo, these APIs are actual C++ type names. Having other C++ types with
the same name is eternally confusing.

In the future one day LayerTreeFrameSink will submit ContentFrames or
so instead of CompositorFrames, luckily its name won't need to change
at that time.

This CL is not opinionated on what things *should* be using. There are
some places that are using LayerTreeFrameSinks that clearly should not
be since they are not involved with LayerTreeHost. However this CL
makes these more obvious instead of being hidden.

Once this is done, we may rename the MojoCompositorFrameSink API to
CompositorFrameSink and be free of the mojom::Mojo conundrum.

R=enne@chromium.org, fsamuel@chromium.org
TBR=sky@chromium.org, jam@chromium.org

Bug: 722935
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I26377c13f46fc7aff9bb4f43590ee7e42c00df40
Reviewed-on: https://chromium-review.googlesource.com/538096
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481086}
2017-06-21 02:21:09 +00:00
wkorman
f09921d0d0 Replace LayerImpl::sorting_context_id with transform reference.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2615773003
Cr-Commit-Position: refs/heads/master@{#442121}
2017-01-07 01:01:20 +00:00
piman
c44437a22b Move GpuMemoryBufferManager and SharedBitmapManager to CompositorFrameSink
They're only used by the ResourceProvider, so there's no fundamental reason for
them to take a separate path through the compositor. Besides, it is natural that
the CompositorFrameSink contains all the objects needed to create resources, all
at the same place. Finally, it's less code overall.

BUG=None
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2452483002
Cr-Commit-Position: refs/heads/master@{#428551}
2016-10-29 00:12:45 +00:00
danakj
1120f4c4ee cc: Fork OutputSurface into CompositorFrameSink.
After this, OutputSurface is only used for the display
compositor (ie cc::Display and friends). And the
CompositorFrameSink API is used for the layer tree
compositor (ie LayerTreeHost and friends).

OutputSurfaceClient is also forked to an identical
CompositorFrameSinkClient.

For now the two are identical, after this they can diverge
and we can delete things on each that doesn't apply anymore.

Broad renamings are:
SynchronousCompositorOutputSurface -> SynchronousCompositorFrameSink
blimp::DelegatedOutputSurface -> BlimpCompositorFrameSink
BlimpOutputSurfaceClient -> BlimpCompositorFrameSinkProxy
BlimpOutputSurface -> BlimpCompositorFrameSinkProxyClient
SurfaceDisplayOutputSurface -> DirectCompositorFrameSink
TestDelegatingOutputSurface -> TestCompositorFrameSink
CompositorOutputSurface -> RendererCompositorFrameSink
mus::OutputSurface -> mus::CompositorFrameSink

TBR=piman
BUG=606056
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

Review-Url: https://codereview.chromium.org/2337913003
Cr-Commit-Position: refs/heads/master@{#418754}
2016-09-15 02:07:25 +00:00
danakj
6021ec347e cc: Get rid of non-delegated rendering in most cc unit tests.
For tests other than a few LayerTreeTests, this changes all tests that
used a DirectRenderer to use a DelegatingRenderer instead.

FakeLayerTreeHostClient took options for allowing fake software
compositing, but it was unused. The REMOTE_DIRECT_RENDERER_TEST_F macro
was also unused now.

(Also enables SurfaceLayerSwapPromiseWithDraw which was disabled but
the bug is fixed.)

R=enne
TBR=miguelg
BUG=421923,606056
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2171143002
Cr-Commit-Position: refs/heads/master@{#407280}
2016-07-22 22:17:48 +00:00
jaydasika
6b5a32bf6c cc : Stop pushing properties not used on compositor to compositor. (2)
This CL moves double_sided and force_render_surface from LayerImpl to
LayerImplTestProperties and also deletes non-test calls to
SetForceRenderSurface on Layer.

BUG=602438
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1912893002

Cr-Commit-Position: refs/heads/master@{#389256}
2016-04-22 21:58:53 +00:00
weiliangc
189c1a15cc cc: Move RenderTarget Information to Effect Tree
Move render target related information to effect tree and clean up
render target logic.

This CL's major change includes:
1. Effect node's target_id is updated every frame
2. Effect node's target_id always points to closest ancestor that has a
    render surface, and never points to itself.
3. LayerImpl's render target returns the RenderSurfaceImpl that the
    layer contributes to. It is possible the LayerImpl owns that
    RenderSurfaceImpl.
4. RenderSurfaceImpl's render target returns the RenderSurfaceImpl that
    the render surface contributes to.

Resulting from this CL, effect tree can be walked upwards using
target_id, and render target information can be queried from effect
tree.

R=ajuma, enne
BUG=504464, 594675
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1868003002

Cr-Commit-Position: refs/heads/master@{#386399}
2016-04-11 16:18:07 +00:00
danakj
60bc3bcfa8 Convert //cc from scoped_ptr to std::unique_ptr.
R=enne, vmpstr
TBR=piman,sky, skyostil
BUG=554298
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1866203004

Cr-Commit-Position: refs/heads/master@{#386260}
2016-04-09 00:26:35 +00:00
thestig
8d34e46c9a Cleanup: Remove double semicolons.
Found with: git grep -l ';;$' | egrep '\.(cc|h)$' | grep -v third_party

Review URL: https://codereview.chromium.org/1558633002

Cr-Commit-Position: refs/heads/master@{#367361}
2016-01-04 20:35:47 +00:00
avi
02a4d17f5a Switch to standard integer types in cc/.
BUG=138542
TBR=danakj@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1539203002

Cr-Commit-Position: refs/heads/master@{#366333}
2015-12-21 06:15:26 +00:00
weiliangc
c154ce2efa Create RenderSurface on Effect Tree
Move RenderSurface creation reason to effect tree. Update LayerImpl's
API to include SetForceRenderSurface. Update unittests.

R=enne
BUG=557160
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Committed: https://crrev.com/4374c2cc231a7e5b6ae65d0e0814b5dccf445200
Cr-Commit-Position: refs/heads/master@{#363544}

Review URL: https://codereview.chromium.org/1491033002

Cr-Commit-Position: refs/heads/master@{#363967}
2015-12-09 03:40:25 +00:00
weiliangc
effae046c6 Revert of Create RenderSurface on Effect Tree (patchset id:120001 of https://codereview.chromium.org/1491033002/ )
Reason for revert:
crbug.com/567529. Top crash.

Original issue's description:
> Create RenderSurface on Effect Tree
>
> Move RenderSurface creation reason to effect tree. Update LayerImpl's
> API to include SetForceRenderSurface. Update unittests.
>
> R=enne
> BUG=557160
> CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/4374c2cc231a7e5b6ae65d0e0814b5dccf445200
> Cr-Commit-Position: refs/heads/master@{#363544}

TBR=ajuma@chromium.org,enne@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=557160
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1505243003

Cr-Commit-Position: refs/heads/master@{#363815}
2015-12-08 23:18:42 +00:00
weiliangc
4374c2cc23 Create RenderSurface on Effect Tree
Move RenderSurface creation reason to effect tree. Update LayerImpl's
API to include SetForceRenderSurface. Update unittests.

R=enne
BUG=557160
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1491033002

Cr-Commit-Position: refs/heads/master@{#363544}
2015-12-07 19:27:18 +00:00
danakj
a04855af14 cc: Replace Pass() with std::move() in some subdirs.
This hits the following:
cc/layers/
cc/output/
cc/quads/
cc/resources/
cc/scheduler/
cc/surfaces/
cc/trees/

R=enne, vmpstr
BUG=557422
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1455023002

Cr-Commit-Position: refs/heads/master@{#360405}
2015-11-18 20:39:58 +00:00
khushalsagar
b64b360d1c cc: Split Proxy to eliminate unnecessary dependencies on the impl side
The impl side of the compositor uses Proxy to only access the
task runners and make debug assertions. Move those parts to
TaskRunnerProvider to seperate these dependencies.

BUG=527200
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1411663002

Cr-Commit-Position: refs/heads/master@{#355370}
2015-10-21 19:26:08 +00:00
sievers
71c62dd5e2 cc: Remove SetLayerTreeHostClientReady()
There are no call sites that need this anymore, the behavior
can be achieved in other ways now that OutputSurface creation
has been async for a while.

Also make the default LTH state invisible to match the scheduler
init state. This also avoids races where we'd otherwise schedule
actions when starting the proxy (i.e. LTH creation time)
which were previously delayed until setLTHClientReady().

BUG=538714,539991

TBR=dtrainor@chromium.org

CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1385043002

Cr-Commit-Position: refs/heads/master@{#352742}
2015-10-07 01:45:35 +00:00
reveman
d180dfc319 Re-land: cc: Implement shared worker contexts.
This moves the responsibility to call BindToCurrentThread/SetupLock out
of cc::OutputSurface and to the maintainer of the (possibly) shared
context.

OutputSurface now needs to be destroyed on the same thread they
were created. OutputSurface::DetachFromClient() can be used to
destroy any resources that need to be destroyed on the thread
that the OutputSurface has been bound to.

BUG=523411,525811
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1336733002

Cr-Commit-Position: refs/heads/master@{#350409}
2015-09-24 00:34:48 +00:00
kbr
d29c2783db Revert of cc: Implement shared worker contexts. (patchset id:160001 of https://codereview.chromium.org/1336733002/ )
Reason for revert:
Broke GPU rasterization on Mac OS; please see https://code.google.com/p/chromium/issues/detail?id=523411#c26 .

I'm really sorry -- I don't know how this got past the CQ.

Original issue's description:
> cc: Implement shared worker contexts.
>
> This moves the responsibility to call BindToCurrentThread/SetupLock out
> of cc::OutputSurface and to the maintainer of the (possibly) shared
> context.
>
> OutputSurface now needs to be destroyed on the same thread they
> were created. OutputSurface::DetachFromClient() can be used to
> destroy any resources that need to be destroyed on the thread
> that the OutputSurface has been bound to.
>
> BUG=523411
> CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
>
> Committed: https://crrev.com/a47ef41ea03d3a5b8965eb700b682ddf8a1f055a
> Cr-Commit-Position: refs/heads/master@{#349274}

TBR=danakj@chromium.org,piman@chromium.org,sievers@chromium.org,reveman@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=523411

Review URL: https://codereview.chromium.org/1356463002

Cr-Commit-Position: refs/heads/master@{#349313}
2015-09-17 01:43:38 +00:00
reveman
a47ef41ea0 cc: Implement shared worker contexts.
This moves the responsibility to call BindToCurrentThread/SetupLock out
of cc::OutputSurface and to the maintainer of the (possibly) shared
context.

OutputSurface now needs to be destroyed on the same thread they
were created. OutputSurface::DetachFromClient() can be used to
destroy any resources that need to be destroyed on the thread
that the OutputSurface has been bound to.

BUG=523411
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1336733002

Cr-Commit-Position: refs/heads/master@{#349274}
2015-09-16 23:24:12 +00:00
danakj
64767d90be cc: Rename visible_content_rect and content stuff on quads.
This renames visible_content_rect to visible_layer_rect. And for
SharedQuadState renames the transforms and rects to no longer refer
to "content" and instead refer to the space the the DrawQuad rects.

R=enne, vmpstr
TBR=dcheng
BUG=413479
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1175113010

Cr-Commit-Position: refs/heads/master@{#335172}
2015-06-19 00:11:03 +00:00
danakj
3b8b2bf905 cc: Remove LayerImpl::SetContentBounds()
The method is now empty, remove all callsites, which are by far
mostly all tests at this point.

R=enne, vmpstr
BUG=413479
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1180073015

Cr-Commit-Position: refs/heads/master@{#334989}
2015-06-18 03:10:29 +00:00
danakj
cf61058795 cc: Turn impl_side_painting and use_one_copy on in LayerTreeSettings.
Make these default to true in LayerTreeSettings so that all unit tests
will use them automatically unless they opt out. Fix all the tests
that crashed with this on, due to having a null cc::TaskGraphRunner.

R=enne, vmpstr
BUG=413479
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
NOTRY=true

Review URL: https://codereview.chromium.org/1177033008

Cr-Commit-Position: refs/heads/master@{#334726}
2015-06-16 22:49:31 +00:00
danakj
26bcd452dc cc: Add ResourceId validation checks at the time of AppendQuads.
This will help us track down how an invalid resource is ending up in
the frame hopefully.

R=enne, piman@chromium.org
BUG=455931

Review URL: https://codereview.chromium.org/1062043003

Cr-Commit-Position: refs/heads/master@{#324103}
2015-04-07 20:15:25 +00:00
danakj
a8c66a5d29 cc: Stop passing the occlusion explicitly to AppendQuads.
The occlusion is a draw property, the layer can access it from there
like other draw properties.

Cleanup CL since moving occlusion to draw properties. Too many
AppendQuads overrides... :(

R=enne
BUG=446751
NOTRY=true

Review URL: https://codereview.chromium.org/927783002

Cr-Commit-Position: refs/heads/master@{#316358}
2015-02-14 01:54:15 +00:00
awoloszyn
e83f28ca81 Move RenderSurface creation outside of CalcDrawProps
BUG=386788

Review URL: https://codereview.chromium.org/465853004

Cr-Commit-Position: refs/heads/master@{#309428}
2014-12-22 15:40:46 +00:00
bokan
cccfde7dac Revert of "Converted LayerImpl::bounds() to return SizeF."
Seems this was more contentious than originally anticipated. Reverting
this until we have consensus on how to go forward.

TBR=aelias@chromium.org,enne@chromium.org,danakj@chromium.org
BUG=

Review URL: https://codereview.chromium.org/637913003

Cr-Commit-Position: refs/heads/master@{#298710}
2014-10-08 15:15:44 +00:00
vmpstr
11b77b43a0 cc: Pass Occlusion instead of OcclusionTracker to LayerImpls
This patch updates LayerImpls to accept Occlusion into AppendQuads
instead of OcclusionTracker. This makes it possible for the layer
to retain a local copy for whatever reason, and restricts the code
from modifying occlusion information in unexpected ways.

R=danakj

Review URL: https://codereview.chromium.org/633773004

Cr-Commit-Position: refs/heads/master@{#298556}
2014-10-07 20:12:04 +00:00
bokan
c7935852d9 Converted LayerImpl::bounds() to return SizeF.
Since bounds includes bounds_delta, which is SizeF, it makes sense to return
the floating point sum of these two values. In call sites broken by the
change, the returned value is converted to Size using ToCeiledSize to
preserve the current snapping behavior, though in most (all?) these cases
the layer bounds are expected to be integral anyway.

BUG=

Review URL: https://codereview.chromium.org/634683003

Cr-Commit-Position: refs/heads/master@{#298439}
2014-10-07 10:33:28 +00:00
weiliangc
032e929d16 Use custom ListContainer to allocate DrawQuads
In RenderPass use ListContainer for generating DrawQuads and acting as
QuadList.

BUG=344962

Review URL: https://codereview.chromium.org/448303002

Cr-Commit-Position: refs/heads/master@{#296855}
2014-09-26 01:55:13 +00:00
hartmanng
53af0fedc3 Apply the correct transform_to_root_target DelegatedRendererLayerImpl::AppendRenderPassQuads().
render_pass->transform_to_root_target should've been
delegated_render_pass->transform_to_root_target.

BUG=406274

Review URL: https://codereview.chromium.org/546993002

Cr-Commit-Position: refs/heads/master@{#296036}
2014-09-22 20:26:27 +00:00
weiliangc@chromium.org
c6707fdbb7 Removed QuadSink and MockQuadCuller
Since QuadSink does not provide more functionatility than passing
through to RenderPass and OcclusionTracker, it can be torn down and
removed. Same is for MockQuadCuller.

This CL follows 302603006, 306683002, 309493002.

BUG=344962
TEST=cc_unittests

Review URL: https://codereview.chromium.org/308193003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279050 0039d316-1c4b-4281-b951-d872f2087c98
2014-06-23 05:50:36 +00:00
weiliangc@chromium.org
b74d7f2825 MockQC stops create its own RP and MockOcclusionTracker
MockQuadCuller used to make its own RenderPass and Occlusion Tracker
when nothing is passed in. Now all unittests use MockQC has to create
their own RP and OT, and pass pointers to MockQC. This would make
MockQC mimick QC behavior.

Next CL would use one QuadSink function to replace the hierarchy of
QuadSink, QuadCuller, and MockQuadCuller.

This CL follows 306683002.

BUG=344962
TEST=cc_unittests

Review URL: https://codereview.chromium.org/306683002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277099 0039d316-1c4b-4281-b951-d872f2087c98
2014-06-13 22:01:42 +00:00
chrishtr@chromium.org
a25664116c Get rid of graphics layer anchor points, and replace with
transform origin.

This is the cc side change that listens to transform origin
instead of anchor point. Blink is already populating both
fields.

BUG=372837

Review URL: https://codereview.chromium.org/295193002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274990 0039d316-1c4b-4281-b951-d872f2087c98
2014-06-05 03:14:20 +00:00
reed@google.com
0046982c81 SkColorType instead of (deprecated) SkBitmap::Config
Part of this refactoring was the recognition of a common pattern:
- setConfig + alloc + setImmutable + pass_to_UIResourceBitmap

This CL introduces a direct way on UIResourceBitmap to create such a bitmap, by just specifying its dimensions. This encapsulates internal requirements (e.g. colortype and immutability).

Review URL: https://codereview.chromium.org/197883017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259349 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-25 22:00:51 +00:00
jbauman@chromium.org
4e2eb35838 Switch to use SharedBitmapManager all the time in cc_unittests
This matches the behavior of the browser and renderer better, and lets us use SharedBitmaps in more tests.

Review URL: https://codereview.chromium.org/202763002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258318 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-20 17:25:45 +00:00
danakj@chromium.org
353908965d cc: Apply occlusion before creating quads in UIResourceLayerImpl.
This makes the AppendQuads method query occlusion directly and subtract
it from the quads it would create before they are created, skipping
quads that are completely occluded and avoiding a malloc/free for them.

Depends on: https://codereview.chromium.org/201153021/

R=enne
BUG=344962

Review URL: https://codereview.chromium.org/203463015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258228 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-20 06:36:13 +00:00
prashant.n@samsung.com
64348eae94 [] Pass gfx::Size by const ref.
Any struct of size > 4 bytes should be passed by const ref. 
Passing by ref for these structs is faster than passing by value,
especially when invoking function has multiple parameters and some
other scenarios mentioned in the bug.

BUG=159273

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247426

Review URL: https://codereview.chromium.org/145313006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247769 0039d316-1c4b-4281-b951-d872f2087c98
2014-01-29 22:58:26 +00:00