diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 03:25:05 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 03:25:05 +0000 |
commit | 6138db702aa3c08703b2952b5aaa1ba7533a3813 (patch) | |
tree | 003d2b10f8a20ef82911b63d060084997ef958a7 /cc/output | |
parent | 63f8b5a1835d589ba335006749b04d1aa2340bd7 (diff) | |
download | chromium_src-6138db702aa3c08703b2952b5aaa1ba7533a3813.zip chromium_src-6138db702aa3c08703b2952b5aaa1ba7533a3813.tar.gz chromium_src-6138db702aa3c08703b2952b5aaa1ba7533a3813.tar.bz2 |
Fix compilation and ui_unittests with float transforms
This change also cleans up the use of gfx::Transform::get/setDouble
(in favor of get/set) at callsites to prepare for changing SkMScalar
from double to float.
BUG=269817
Originally Committed/Reverted: https://src.chromium.org/viewvc/chrome?view=rev&revision=224725
Review URL: https://chromiumcodereview.appspot.com/23811009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output')
-rw-r--r-- | cc/output/direct_renderer.cc | 10 | ||||
-rw-r--r-- | cc/output/renderer_pixeltest.cc | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc index aad41ed..0ee5adc 100644 --- a/cc/output/direct_renderer.cc +++ b/cc/output/direct_renderer.cc @@ -28,14 +28,14 @@ static gfx::Transform OrthoProjectionMatrix(float left, gfx::Transform proj; if (!delta_x || !delta_y) return proj; - proj.matrix().setDouble(0, 0, 2.0f / delta_x); - proj.matrix().setDouble(0, 3, -(right + left) / delta_x); - proj.matrix().setDouble(1, 1, 2.0f / delta_y); - proj.matrix().setDouble(1, 3, -(top + bottom) / delta_y); + proj.matrix().set(0, 0, 2.0f / delta_x); + proj.matrix().set(0, 3, -(right + left) / delta_x); + proj.matrix().set(1, 1, 2.0f / delta_y); + proj.matrix().set(1, 3, -(top + bottom) / delta_y); // Z component of vertices is always set to zero as we don't use the depth // buffer while drawing. - proj.matrix().setDouble(2, 2, 0); + proj.matrix().set(2, 2, 0); return proj; } diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc index f0187aa..4d9578b 100644 --- a/cc/output/renderer_pixeltest.cc +++ b/cc/output/renderer_pixeltest.cc @@ -1329,10 +1329,10 @@ TEST_F(GLRendererPixelTest, AntiAliasingPerspective) { gfx::Rect red_rect(0, 0, 180, 500); gfx::Transform red_content_to_target_transform( - 1.0, 2.4520, 10.6206, 19.0, - 0.0, 0.3528, 5.9737, 9.5, - 0.0, -0.2250, -0.9744, 0.0, - 0.0, 0.0225, 0.0974, 1.0); + 1.0f, 2.4520f, 10.6206f, 19.0f, + 0.0f, 0.3528f, 5.9737f, 9.5f, + 0.0f, -0.2250f, -0.9744f, 0.0f, + 0.0f, 0.0225f, 0.0974f, 1.0f); scoped_ptr<SharedQuadState> red_shared_state = CreateTestSharedQuadState(red_content_to_target_transform, red_rect); scoped_ptr<SolidColorDrawQuad> red = SolidColorDrawQuad::Create(); |