|
|
Chromium Code Reviews
DescriptionSeparate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
We may want to separate the property and context updates into two functions in
a followup but it is not a straightforward refactor because some variables are
shared between the two updates.
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Committed: https://crrev.com/95247e236ea9fcb826b8f50e3cecdb2082833aee
Cr-Commit-Position: refs/heads/master@{#428570}
Patch Set 1 #Patch Set 2 : Cleanup names/comments, fix preserves3d bug #
Messages
Total messages: 40 (20 generated)
The CQ bit was checked by pdr@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
The CQ bit was checked by pdr@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from
==========
Separate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
to
==========
Separate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
We may want to separate the property and context updates into two functions in
a followup but it is not a completely trivial refactor.
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
Description was changed from
==========
Separate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
We may want to separate the property and context updates into two functions in
a followup but it is not a completely trivial refactor.
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
to
==========
Separate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
We may want to separate the property and context updates into two functions in
a followup but it is not a straightforward refactor.
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
Description was changed from
==========
Separate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
We may want to separate the property and context updates into two functions in
a followup but it is not a straightforward refactor.
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
to
==========
Separate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
We may want to separate the property and context updates into two functions in
a followup but it is not a straightforward refactor because some variables are
shared between the two updates.
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
pdr@chromium.org changed reviewers: + trchen@chromium.org, wangxianzhu@chromium.org
Still waiting on cluster telemetry results for this patch.
On 2016/10/27 22:39:34, pdr. wrote: > Still waiting on cluster telemetry results for this patch. Is it a prerequisite for incremental update? I'm guessing the follow-up would be: "If no dirty flag, jump over the updates to context bookkeeping directly."
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
On 2016/10/27 at 23:15:21, trchen wrote: > On 2016/10/27 22:39:34, pdr. wrote: > > Still waiting on cluster telemetry results for this patch. > > Is it a prerequisite for incremental update? > I'm guessing the follow-up would be: "If no dirty flag, jump over the updates to context bookkeeping directly." Yeah, exactly. My goal here is just to make this easy on reviewers because there's a lot of complex code moving around.
On 2016/10/28 00:02:13, pdr. wrote:
> On 2016/10/27 at 23:15:21, trchen wrote:
> > On 2016/10/27 22:39:34, pdr. wrote:
> > > Still waiting on cluster telemetry results for this patch.
> >
> > Is it a prerequisite for incremental update?
> > I'm guessing the follow-up would be: "If no dirty flag, jump over the
updates
> to context bookkeeping directly."
>
> Yeah, exactly. My goal here is just to make this easy on reviewers because
> there's a lot of complex code moving around.
My concern is that node update and context bookkeeping may still need to be
interleaved, because a latter node may be parented under an optional previous
node. For example, ideally we want the form:
if (dirty) {
updateTransform();
updateOverflowClip();
}
bookkeepingTransform();
bookkeepingOverflowClip();
But due to inter-dependencies between scroll and transform, we may end up
writing:
if (dirty)
updateTransform()
bookkeepingTransform();
if (dirty)
updateOverflowClip();
bookkeepingOverflowClip();
Is this intended?
On 2016/10/28 at 00:37:13, trchen wrote:
> On 2016/10/28 00:02:13, pdr. wrote:
> > On 2016/10/27 at 23:15:21, trchen wrote:
> > > On 2016/10/27 22:39:34, pdr. wrote:
> > > > Still waiting on cluster telemetry results for this patch.
> > >
> > > Is it a prerequisite for incremental update?
> > > I'm guessing the follow-up would be: "If no dirty flag, jump over the
updates
> > to context bookkeeping directly."
> >
> > Yeah, exactly. My goal here is just to make this easy on reviewers because
> > there's a lot of complex code moving around.
>
> My concern is that node update and context bookkeeping may still need to be
interleaved, because a latter node may be parented under an optional previous
node. For example, ideally we want the form:
>
> if (dirty) {
> updateTransform();
> updateOverflowClip();
> }
> bookkeepingTransform();
> bookkeepingOverflowClip();
>
> But due to inter-dependencies between scroll and transform, we may end up
writing:
>
> if (dirty)
> updateTransform()
> bookkeepingTransform();
> if (dirty)
> updateOverflowClip();
> bookkeepingOverflowClip();
>
> Is this intended?
A great point but this ends up not being an issue in practice; I think
updateOverflowClip is the only example. You can see this in the proof-of-concept
patch where we need to use a pointer in updateOverflowClip (search for
currentClip): https://codereview.chromium.org/2404213004
The more common situation is that the inter-dependencies are not optional. For
example, in updateScrollAndScrollTranslation the Scroll node depends on a
ScrollTranslation node, but because it is always created we just have:
if (dirty) {
properties.updateScrollTranslation();
properties.updateScroll(properties.scrollTranslation());
}
bookkeepingScrollTranslation();
bookkeepingScroll();
Btw, this seems to have had no effect on cluster telemetry.
lgtm
On 2016/10/28 at 18:57:26, wangxianzhu wrote: > lgtm thanks! @trchen, I'd like to make sure your concerns are addressed before landing.
lgtm too. Just wanted to make sure you were aware of it. (clicking commit)
The CQ bit was checked by trchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...)
The CQ bit was checked by pdr@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
On 2016/10/28 at 23:10:09, commit-bot wrote: > Try jobs failed on following builders: > linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) I'm able to build locally so I think this is just an infra issue.
The CQ bit was checked by pdr@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by pdr@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from
==========
Separate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
We may want to separate the property and context updates into two functions in
a followup but it is not a straightforward refactor because some variables are
shared between the two updates.
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
==========
to
==========
Separate property and context updates in PaintPropertyTreeBuilder
This patch is a refactoring to separate the context update from
property building/updating in PaintPropertyTreeBuilder. This
patch will make future changes to PaintPropertyTreeBuilder
simpler, such as skipping the property update step entirely if
possible. Because of the size of this change, I'd like to land
this as a pure refactoring before any changes are introduced.
The big idea in this patch is to refactor this pattern:
void updateProperty(object, context) {
if (object needs property)
context.property = object.properties.update(...);
else
object.properties.clearProperty();
}
To this new pattern:
void updateProperty(object, context) {
// Update property.
if (object needs property)
object.properties.update(...);
else
object.properties.clearProperty();
// Update context.
if (object.properties.property())
context.property = object.properties.property();
}
We may want to separate the property and context updates into two functions in
a followup but it is not a straightforward refactor because some variables are
shared between the two updates.
BUG=645667
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Committed: https://crrev.com/95247e236ea9fcb826b8f50e3cecdb2082833aee
Cr-Commit-Position: refs/heads/master@{#428570}
==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/95247e236ea9fcb826b8f50e3cecdb2082833aee Cr-Commit-Position: refs/heads/master@{#428570} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
