diff options
Diffstat (limited to 'cc')
-rw-r--r-- | cc/animation/keyframed_animation_curve_unittest.cc | 8 | ||||
-rw-r--r-- | cc/animation/transform_operation.cc | 2 | ||||
-rw-r--r-- | cc/base/float_quad_unittest.cc | 38 | ||||
-rw-r--r-- | cc/base/math_util.cc | 12 | ||||
-rw-r--r-- | cc/base/math_util.h | 8 | ||||
-rw-r--r-- | cc/base/math_util_unittest.cc | 2 | ||||
-rw-r--r-- | cc/layers/delegated_renderer_layer_impl_unittest.cc | 10 | ||||
-rw-r--r-- | cc/layers/layer_impl_unittest.cc | 4 | ||||
-rw-r--r-- | cc/output/direct_renderer.cc | 10 | ||||
-rw-r--r-- | cc/output/renderer_pixeltest.cc | 8 | ||||
-rw-r--r-- | cc/trees/layer_sorter_unittest.cc | 4 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_common.cc | 6 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_common_unittest.cc | 22 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl_unittest.cc | 4 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_pixeltest_filters.cc | 4 | ||||
-rw-r--r-- | cc/trees/quad_culler_unittest.cc | 9 |
16 files changed, 76 insertions, 75 deletions
diff --git a/cc/animation/keyframed_animation_curve_unittest.cc b/cc/animation/keyframed_animation_curve_unittest.cc index 7eb3b1c..48f511c0 100644 --- a/cc/animation/keyframed_animation_curve_unittest.cc +++ b/cc/animation/keyframed_animation_curve_unittest.cc @@ -12,8 +12,8 @@ namespace cc { namespace { -void ExpectTranslateX(SkMScalar translate_x, const gfx::Transform& transform) { - EXPECT_FLOAT_EQ(translate_x, transform.matrix().get(0, 3)); +void ExpectTranslateX(double translate_x, const gfx::Transform& transform) { + EXPECT_FLOAT_EQ(translate_x, transform.matrix().getDouble(0, 3)); } void ExpectBrightness(double brightness, const FilterOperations& filter) { @@ -185,8 +185,8 @@ TEST(KeyframedAnimationCurveTest, RepeatedTransformKeyTimes) { // There is a discontinuity at 1. Any value between 4 and 6 is valid. gfx::Transform value = curve->GetValue(1.f); - EXPECT_GE(value.matrix().get(0, 3), 4.f); - EXPECT_LE(value.matrix().get(0, 3), 6.f); + EXPECT_GE(value.matrix().getDouble(0.f, 3.f), 4); + EXPECT_LE(value.matrix().getDouble(0.f, 3.f), 6); ExpectTranslateX(6.f, curve->GetValue(1.5f)); ExpectTranslateX(6.f, curve->GetValue(2.f)); diff --git a/cc/animation/transform_operation.cc b/cc/animation/transform_operation.cc index a9fd44fb..93f40f3 100644 --- a/cc/animation/transform_operation.cc +++ b/cc/animation/transform_operation.cc @@ -12,7 +12,7 @@ #include "ui/gfx/vector3d_f.h" namespace { -const SkMScalar kAngleEpsilon = SkDoubleToMScalar(1e-4); +const SkMScalar kAngleEpsilon = 1e-4; } namespace cc { diff --git a/cc/base/float_quad_unittest.cc b/cc/base/float_quad_unittest.cc index c2186fd81..186624e 100644 --- a/cc/base/float_quad_unittest.cc +++ b/cc/base/float_quad_unittest.cc @@ -15,15 +15,15 @@ namespace { TEST(FloatQuadTest, IsRectilinearTest) { const int kNumRectilinear = 8; gfx::Transform rectilinear_trans[kNumRectilinear]; - rectilinear_trans[1].Rotate(90.f); - rectilinear_trans[2].Rotate(180.f); - rectilinear_trans[3].Rotate(270.f); - rectilinear_trans[4].SkewX(0.00000000001f); - rectilinear_trans[5].SkewY(0.00000000001f); - rectilinear_trans[6].Scale(0.00001f, 0.00001f); - rectilinear_trans[6].Rotate(180.f); - rectilinear_trans[7].Scale(100000.f, 100000.f); - rectilinear_trans[7].Rotate(180.f); + rectilinear_trans[1].Rotate(90.0); + rectilinear_trans[2].Rotate(180.0); + rectilinear_trans[3].Rotate(270.0); + rectilinear_trans[4].SkewX(0.00000000001); + rectilinear_trans[5].SkewY(0.00000000001); + rectilinear_trans[6].Scale(0.00001, 0.00001); + rectilinear_trans[6].Rotate(180.0); + rectilinear_trans[7].Scale(100000, 100000); + rectilinear_trans[7].Rotate(180.0); gfx::QuadF original( gfx::RectF(0.01010101f, 0.01010101f, 100.01010101f, 100.01010101f)); @@ -38,16 +38,16 @@ TEST(FloatQuadTest, IsRectilinearTest) { const int kNumNonRectilinear = 10; gfx::Transform non_rectilinear_trans[kNumNonRectilinear]; - non_rectilinear_trans[0].Rotate(359.9999f); - non_rectilinear_trans[1].Rotate(0.0000001f); - non_rectilinear_trans[2].Rotate(89.9999f); - non_rectilinear_trans[3].Rotate(90.00001f); - non_rectilinear_trans[4].Rotate(179.9999f); - non_rectilinear_trans[5].Rotate(180.00001f); - non_rectilinear_trans[6].Rotate(269.9999f); - non_rectilinear_trans[7].Rotate(270.0001f); - non_rectilinear_trans[8].SkewX(0.00001f); - non_rectilinear_trans[9].SkewY(0.00001f); + non_rectilinear_trans[0].Rotate(359.999); + non_rectilinear_trans[1].Rotate(0.0000001); + non_rectilinear_trans[2].Rotate(89.999999); + non_rectilinear_trans[3].Rotate(90.0000001); + non_rectilinear_trans[4].Rotate(179.999999); + non_rectilinear_trans[5].Rotate(180.0000001); + non_rectilinear_trans[6].Rotate(269.999999); + non_rectilinear_trans[7].Rotate(270.0000001); + non_rectilinear_trans[8].SkewX(0.00001); + non_rectilinear_trans[9].SkewY(0.00001); for (int i = 0; i < kNumNonRectilinear; ++i) { bool clipped = false; diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc index 764c461..40b8d11 100644 --- a/cc/base/math_util.cc +++ b/cc/base/math_util.cc @@ -72,13 +72,13 @@ static HomogeneousCoordinate ComputeClippedPointForEdge( // w plane when this is called. DCHECK(h1.ShouldBeClipped() ^ h2.ShouldBeClipped()); - // ...or any positive non-zero small epsilon - double w = 0.00001; - double t = (w - h1.w()) / (h2.w() - h1.w()); + SkMScalar w = 0.00001; // or any positive non-zero small epsilon - SkMScalar x = SkDoubleToMScalar((1.0 - t) * h1.x() + t * h2.x()); - SkMScalar y = SkDoubleToMScalar((1.0 - t) * h1.y() + t * h2.y()); - SkMScalar z = SkDoubleToMScalar((1.0 - t) * h1.z() + t * h2.z()); + SkMScalar t = (w - h1.w()) / (h2.w() - h1.w()); + + SkMScalar x = (1 - t) * h1.x() + t * h2.x(); + SkMScalar y = (1 - t) * h1.y() + t * h2.y(); + SkMScalar z = (1 - t) * h1.z() + t * h2.z(); return HomogeneousCoordinate(x, y, z, w); } diff --git a/cc/base/math_util.h b/cc/base/math_util.h index 67a9370..7912f8a 100644 --- a/cc/base/math_util.h +++ b/cc/base/math_util.h @@ -39,24 +39,24 @@ struct HomogeneousCoordinate { bool ShouldBeClipped() const { return w() <= 0.0; } gfx::PointF CartesianPoint2d() const { - if (w() == SK_MScalar1) + if (w() == 1.0) return gfx::PointF(x(), y()); // For now, because this code is used privately only by MathUtil, it should // never be called when w == 0, and we do not yet need to handle that case. DCHECK(w()); - SkMScalar inv_w = SK_MScalar1 / w(); + SkMScalar inv_w = 1.0 / w(); return gfx::PointF(x() * inv_w, y() * inv_w); } gfx::Point3F CartesianPoint3d() const { - if (w() == SK_MScalar1) + if (w() == 1) return gfx::Point3F(x(), y(), z()); // For now, because this code is used privately only by MathUtil, it should // never be called when w == 0, and we do not yet need to handle that case. DCHECK(w()); - SkMScalar inv_w = SK_MScalar1 / w(); + SkMScalar inv_w = 1.0 / w(); return gfx::Point3F(x() * inv_w, y() * inv_w, z() * inv_w); } diff --git a/cc/base/math_util_unittest.cc b/cc/base/math_util_unittest.cc index 5bcf2ee..d62280d 100644 --- a/cc/base/math_util_unittest.cc +++ b/cc/base/math_util_unittest.cc @@ -22,7 +22,7 @@ TEST(MathUtilTest, ProjectionOfPerpendicularPlane) { gfx::Transform transform; transform.MakeIdentity(); - transform.matrix().set(2, 2, 0); + transform.matrix().setDouble(2, 2, 0); gfx::RectF rect = gfx::RectF(0, 0, 1, 1); gfx::RectF projected_rect = MathUtil::ProjectClippedRect(transform, rect); diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc index 711ef01..a641e00 100644 --- a/cc/layers/delegated_renderer_layer_impl_unittest.cc +++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc @@ -480,7 +480,7 @@ class DelegatedRendererLayerImplTestTransform gfx::Size child_pass_content_bounds(7, 7); gfx::Rect child_pass_rect(20, 20, 7, 7); gfx::Transform child_pass_transform; - child_pass_transform.Scale(0.8f, 0.8f); + child_pass_transform.Scale(0.8, 0.8); child_pass_transform.Translate(9.0, 9.0); gfx::Rect child_pass_clip_rect(21, 21, 3, 3); bool child_pass_clipped = false; @@ -677,7 +677,7 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsUnclipped_NoSurface) { contrib_delegated_shared_quad_state->clip_rect.ToString()); EXPECT_FALSE(contrib_delegated_shared_quad_state->is_clipped); expected.MakeIdentity(); - expected.Scale(0.8f, 0.8f); + expected.Scale(0.8, 0.8); expected.Translate(9.0, 9.0); EXPECT_TRANSFORMATION_MATRIX_EQ( expected, @@ -740,7 +740,7 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsClipped_NoSurface) { contrib_delegated_shared_quad_state->clip_rect.ToString()); EXPECT_FALSE(contrib_delegated_shared_quad_state->is_clipped); expected.MakeIdentity(); - expected.Scale(0.8f, 0.8f); + expected.Scale(0.8, 0.8); expected.Translate(9.0, 9.0); EXPECT_TRANSFORMATION_MATRIX_EQ( expected, @@ -796,7 +796,7 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsUnclipped_Surface) { contrib_delegated_shared_quad_state->clip_rect.ToString()); EXPECT_FALSE(contrib_delegated_shared_quad_state->is_clipped); expected.MakeIdentity(); - expected.Scale(0.8f, 0.8f); + expected.Scale(0.8, 0.8); expected.Translate(9.0, 9.0); EXPECT_TRANSFORMATION_MATRIX_EQ( expected, @@ -851,7 +851,7 @@ TEST_F(DelegatedRendererLayerImplTestTransform, QuadsClipped_Surface) { contrib_delegated_shared_quad_state->clip_rect.ToString()); EXPECT_FALSE(contrib_delegated_shared_quad_state->is_clipped); expected.MakeIdentity(); - expected.Scale(0.8f, 0.8f); + expected.Scale(0.8, 0.8); expected.Translate(9.0, 9.0); EXPECT_TRANSFORMATION_MATRIX_EQ( expected, diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc index 3d8948a..1ab7a71 100644 --- a/cc/layers/layer_impl_unittest.cc +++ b/cc/layers/layer_impl_unittest.cc @@ -99,7 +99,7 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) { gfx::RectF(arbitrary_point_f, gfx::SizeF(1.234f, 5.678f)); SkColor arbitrary_color = SkColorSetRGB(10, 20, 30); gfx::Transform arbitrary_transform; - arbitrary_transform.Scale3d(0.1f, 0.2f, 0.3f); + arbitrary_transform.Scale3d(0.1, 0.2, 0.3); FilterOperations arbitrary_filters; arbitrary_filters.Append(FilterOperation::CreateOpacityFilter(0.5f)); skia::RefPtr<SkImageFilter> arbitrary_filter = @@ -213,7 +213,7 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) { gfx::RectF(arbitrary_point_f, gfx::SizeF(1.234f, 5.678f)); SkColor arbitrary_color = SkColorSetRGB(10, 20, 30); gfx::Transform arbitrary_transform; - arbitrary_transform.Scale3d(0.1f, 0.2f, 0.3f); + arbitrary_transform.Scale3d(0.1, 0.2, 0.3); FilterOperations arbitrary_filters; arbitrary_filters.Append(FilterOperation::CreateOpacityFilter(0.5f)); skia::RefPtr<SkImageFilter> arbitrary_filter = diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc index 0ee5adc..aad41ed 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().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); + 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); // Z component of vertices is always set to zero as we don't use the depth // buffer while drawing. - proj.matrix().set(2, 2, 0); + proj.matrix().setDouble(2, 2, 0); return proj; } diff --git a/cc/output/renderer_pixeltest.cc b/cc/output/renderer_pixeltest.cc index 4d9578b..f0187aa 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.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); + 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); scoped_ptr<SharedQuadState> red_shared_state = CreateTestSharedQuadState(red_content_to_target_transform, red_rect); scoped_ptr<SolidColorDrawQuad> red = SolidColorDrawQuad::Create(); diff --git a/cc/trees/layer_sorter_unittest.cc b/cc/trees/layer_sorter_unittest.cc index 6669100..b1d7b81 100644 --- a/cc/trees/layer_sorter_unittest.cc +++ b/cc/trees/layer_sorter_unittest.cc @@ -177,7 +177,7 @@ TEST(LayerSorterTest, LayersUnderPathologicalPerspectiveTransform) { // layer_a. When it is not clipped, its bounds will actually incorrectly // appear much smaller and the correct sorting dependency will not be found. gfx::Transform transform_b; - transform_b.Translate3d(0.f, 0.f, 0.7f); + transform_b.Translate3d(0.0, 0.0, 0.7); transform_b.RotateAboutYAxis(45.0); transform_b.Translate(-5.0, -5.0); LayerShape layer_b(10.f, 10.f, perspective_matrix * transform_b); @@ -287,7 +287,7 @@ TEST(LayerSorterTest, VerifyConcidentLayerPrecisionLossResultsInDocumentOrder) { // in calculated order. gfx::Transform BehindMatrix; - BehindMatrix.Translate3d(0.f, 0.f, 0.999999f); + BehindMatrix.Translate3d(0.0, 0.0, 0.999999); BehindMatrix.RotateAboutXAxis(38.5); BehindMatrix.RotateAboutYAxis(77.0); gfx::Transform FrontMatrix; diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc index 378e7c8..b843675 100644 --- a/cc/trees/layer_tree_host_common.cc +++ b/cc/trees/layer_tree_host_common.cc @@ -1077,8 +1077,10 @@ static void PreCalculateMetaInformation( } static void RoundTranslationComponents(gfx::Transform* transform) { - transform->matrix().set(0, 3, MathUtil::Round(transform->matrix().get(0, 3))); - transform->matrix().set(1, 3, MathUtil::Round(transform->matrix().get(1, 3))); + transform->matrix(). + setDouble(0, 3, MathUtil::Round(transform->matrix().getDouble(0, 3))); + transform->matrix(). + setDouble(1, 3, MathUtil::Round(transform->matrix().getDouble(1, 3))); } template <typename LayerType> diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc index 6847f9c..5ce1034 100644 --- a/cc/trees/layer_tree_host_common_unittest.cc +++ b/cc/trees/layer_tree_host_common_unittest.cc @@ -343,7 +343,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) { // Case 4: A change in actual position affects both the draw transform and // screen space transform. gfx::Transform position_transform; - position_transform.Translate(0.f, 1.2f); + position_transform.Translate(0.0, 1.2); SetLayerPropertiesForTesting(layer.get(), identity_matrix, identity_matrix, @@ -551,7 +551,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSimpleHierarchy) { // Case 2: parent's position affects child and grand_child. gfx::Transform parent_position_transform; - parent_position_transform.Translate(0.f, 1.2f); + parent_position_transform.Translate(0.0, 1.2); SetLayerPropertiesForTesting(parent.get(), identity_matrix, identity_matrix, @@ -629,7 +629,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSimpleHierarchy) { // does not preserve3D. When it gives its hierarchy to the grand_child, it // should be flattened to 2D. gfx::Transform parent_sublayer_matrix; - parent_sublayer_matrix.Scale3d(10.f, 10.f, 3.3f); + parent_sublayer_matrix.Scale3d(10.0, 10.0, 3.3); // Sublayer matrix is applied to the anchor point of the parent layer. parent_composite_transform = parent_translation_to_anchor * parent_layer_transform * @@ -730,11 +730,11 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleRenderSurface) { child->SetForceRenderSurface(true); gfx::Transform parent_layer_transform; - parent_layer_transform.Scale3d(1.f, 0.9f, 1.f); + parent_layer_transform.Scale3d(1.0, 0.9, 1.0); gfx::Transform parent_translation_to_anchor; parent_translation_to_anchor.Translate(25.0, 30.0); gfx::Transform parent_sublayer_matrix; - parent_sublayer_matrix.Scale3d(0.9f, 1.f, 3.3f); + parent_sublayer_matrix.Scale3d(0.9, 1.0, 3.3); gfx::Transform parent_composite_transform = parent_translation_to_anchor * parent_layer_transform * @@ -876,8 +876,8 @@ TEST_F(LayerTreeHostCommonTest, SeparateRenderTargetRequirementWithClipping) { EXPECT_FALSE(grand_child->render_surface()); // One-time setup of root layer - parent_layer_transform.Scale3d(1.f, 0.9f, 1.f); - parent_sublayer_matrix.Scale3d(0.9f, 1.f, 3.3f); + parent_layer_transform.Scale3d(1.0, 0.9, 1.0); + parent_sublayer_matrix.Scale3d(0.9, 1.0, 3.3); child_layer_matrix.Rotate(20.0); SetLayerPropertiesForTesting(root.get(), @@ -948,8 +948,8 @@ TEST_F(LayerTreeHostCommonTest, EXPECT_FALSE(grand_child->render_surface()); // One-time setup of root layer - parent_layer_transform.Scale3d(1.f, 0.9f, 1.f); - parent_sublayer_matrix.Scale3d(0.9f, 1.f, 3.3f); + parent_layer_transform.Scale3d(1.0, 0.9, 1.0); + parent_sublayer_matrix.Scale3d(0.9, 1.0, 3.3); child_layer_matrix.Rotate(20.0); SetLayerPropertiesForTesting(root.get(), @@ -1024,7 +1024,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForReplica) { gfx::Transform parent_translation_to_anchor; parent_translation_to_anchor.Translate(2.5, 3.0); gfx::Transform parent_sublayer_matrix; - parent_sublayer_matrix.Scale3d(10.f, 10.f, 3.3f); + parent_sublayer_matrix.Scale3d(10.0, 10.0, 3.3); gfx::Transform parent_composite_transform = parent_translation_to_anchor * parent_layer_transform * Inverse(parent_translation_to_anchor) * parent_translation_to_anchor * @@ -6245,7 +6245,7 @@ TEST_F(LayerTreeHostCommonTest, SurfaceLayerTransformsInHighDPI) { perspective_matrix.ApplyPerspectiveDepth(2.0); gfx::Transform scale_small_matrix; - scale_small_matrix.Scale(SK_MScalar1 / 10.f, SK_MScalar1 / 12.f); + scale_small_matrix.Scale(1.0 / 10.0, 1.0 / 12.0); scoped_refptr<Layer> root = Layer::Create(); diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index bab6d20..c184c67 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -4748,7 +4748,7 @@ TEST_F(LayerTreeHostImplTest, SurfaceTextureCaching) { // Change location of the intermediate layer gfx::Transform transform = intermediate_layer_ptr->transform(); - transform.matrix().set(0, 3, 1.0001f); + transform.matrix().setDouble(0, 3, 1.0001); intermediate_layer_ptr->SetTransform(transform); { LayerTreeHostImpl::FrameData frame; @@ -4934,7 +4934,7 @@ TEST_F(LayerTreeHostImplTest, SurfaceTextureCachingNoPartialSwap) { // Change location of the intermediate layer gfx::Transform transform = intermediate_layer_ptr->transform(); - transform.matrix().set(0, 3, 1.0001f); + transform.matrix().setDouble(0, 3, 1.0001); intermediate_layer_ptr->SetTransform(transform); { LayerTreeHostImpl::FrameData frame; diff --git a/cc/trees/layer_tree_host_pixeltest_filters.cc b/cc/trees/layer_tree_host_pixeltest_filters.cc index 4055376..7068b4b 100644 --- a/cc/trees/layer_tree_host_pixeltest_filters.cc +++ b/cc/trees/layer_tree_host_pixeltest_filters.cc @@ -129,8 +129,8 @@ TEST_F(LayerTreeHostFiltersPixelTest, BackgroundFilterBlurOffAxis) { blur->SetBackgroundFilters(filters); #if defined(OS_WIN) - // Windows has 153 pixels off by at most 2: crbug.com/225027 - float percentage_pixels_large_error = 0.3825f; // 153px / (200*200) + // Windows has 151 pixels off by at most 2: crbug.com/225027 + float percentage_pixels_large_error = 0.3775f; // 151px / (200*200) float percentage_pixels_small_error = 0.0f; float average_error_allowed_in_bad_pixels = 1.f; int large_error_allowed = 2; diff --git a/cc/trees/quad_culler_unittest.cc b/cc/trees/quad_culler_unittest.cc index ea64287..120e007 100644 --- a/cc/trees/quad_culler_unittest.cc +++ b/cc/trees/quad_culler_unittest.cc @@ -126,7 +126,6 @@ class QuadCullerTest : public testing::Test { FakeLayerTreeHostImpl host_impl_; int layer_id_; - private: DISALLOW_COPY_AND_ASSIGN(QuadCullerTest); }; @@ -369,8 +368,8 @@ TEST_F(QuadCullerTest, VerifyCullCenterTileNonIntegralSize1) { // Make the root layer's quad have extent (99.1, 99.1) -> (200.9, 200.9) to // make sure it doesn't get culled due to transform rounding. gfx::Transform root_transform; - root_transform.Translate(99.1f, 99.1f); - root_transform.Scale(1.018f, 1.018f); + root_transform.Translate(99.1, 99.1); + root_transform.Scale(1.018, 1.018); root_rect = child_rect = gfx::Rect(0, 0, 100, 100); @@ -417,8 +416,8 @@ TEST_F(QuadCullerTest, VerifyCullCenterTileNonIntegralSize2) { // Make the child's quad slightly smaller than, and centred over, the root // layer tile. Verify the child does not cause the quad below to be culled // due to rounding. - child_transform.Translate(100.1f, 100.1f); - child_transform.Scale(0.982f, 0.982f); + child_transform.Translate(100.1, 100.1); + child_transform.Scale(0.982, 0.982); gfx::Transform root_transform; root_transform.Translate(100, 100); |