Commit 5531a5e0 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

SurfaceLayerImpl: Simplify |shared_quad_state| assignment

Commit b47442dc ("viz: Determine fallback strategy in SurfaceAggregator")
simplified the code in SurfaceLayerImpl::CreateSurfaceDrawQuad(), but ended
up with a construct like this:

    viz::SharedQuadState* foo = foo = bar();

Simplify the assignment and make it more readable.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I88560e1acd1766d4f1676c2aa90b18be32971a60
Reviewed-on: https://chromium-review.googlesource.com/1105829
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568413}
parent e0368aa4
......@@ -127,12 +127,8 @@ viz::SurfaceDrawQuad* SurfaceLayerImpl::CreateSurfaceDrawQuad(
if (visible_quad_rect.IsEmpty())
return nullptr;
// If a |common_shared_quad_state| is provided then use that. Otherwise,
// allocate a new SharedQuadState. Assign the new SharedQuadState to
// *|common_shared_quad_state| so that it may be reused by another emitted
// viz::SurfaceDrawQuad.
viz::SharedQuadState* shared_quad_state =
shared_quad_state = render_pass->CreateAndAppendSharedQuadState();
render_pass->CreateAndAppendSharedQuadState();
PopulateScaledSharedQuadState(shared_quad_state, device_scale_factor,
device_scale_factor, contents_opaque());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment