diff options
author | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-25 23:25:25 +0000 |
---|---|---|
committer | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-25 23:25:25 +0000 |
commit | cfa6f4e66a10dc138ab923dc402c99867ae27f4c (patch) | |
tree | ad260f4fa81d22185c27af9cd5455b4193b5d882 /cc/test/render_pass_test_utils.cc | |
parent | 65fd556559259d923b829cd89618f537f658d15e (diff) | |
download | chromium_src-cfa6f4e66a10dc138ab923dc402c99867ae27f4c.zip chromium_src-cfa6f4e66a10dc138ab923dc402c99867ae27f4c.tar.gz chromium_src-cfa6f4e66a10dc138ab923dc402c99867ae27f4c.tar.bz2 |
Re-land: cc: Fix anti-aliasing of axis-aligned quads.
Axis-aligned quads with edges not aligned to pixel boundaries
are rendered incorrectly. These quads need anti-aliasing but
current code that determines if anti-aliasing is needed thinks
that no axis-aligned quads need it.
This fixes the problem by adding alignment to pixel boundaries
as an additional requirement to avoid anti-aliasing.
BUG=169374
TEST=GLRendererPixelTest.AxisAligned,GLRendererShaderTest.DrawSolidColorShader
Review URL: https://chromiumcodereview.appspot.com/12538005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/render_pass_test_utils.cc')
-rw-r--r-- | cc/test/render_pass_test_utils.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc index 24cb778..719be7f 100644 --- a/cc/test/render_pass_test_utils.cc +++ b/cc/test/render_pass_test_utils.cc @@ -57,6 +57,22 @@ SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass, return quad_ptr; } +SolidColorDrawQuad* AddTransformedQuad(TestRenderPass* pass, + gfx::Rect rect, + SkColor color, + const gfx::Transform& transform) { + MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); + AppendQuadsData data(pass->id); + SharedQuadState* shared_state = + quad_sink.UseSharedQuadState(SharedQuadState::Create()); + shared_state->SetAll(transform, rect.size(), rect, rect, false, 1); + scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); + quad->SetNew(shared_state, rect, color); + SolidColorDrawQuad* quad_ptr = quad.get(); + quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + return quad_ptr; +} + void AddRenderPassQuad(TestRenderPass* to_pass, TestRenderPass* contributing_pass) { MockQuadCuller quad_sink(&to_pass->quad_list, |