OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
6 #include "cc/layers/append_quads_data.h" | 6 #include "cc/layers/append_quads_data.h" |
7 #include "cc/output/gl_renderer.h" | 7 #include "cc/output/gl_renderer.h" |
8 #include "cc/quads/draw_quad.h" | 8 #include "cc/quads/draw_quad.h" |
9 #include "cc/quads/picture_draw_quad.h" | 9 #include "cc/quads/picture_draw_quad.h" |
10 #include "cc/quads/texture_draw_quad.h" | 10 #include "cc/quads/texture_draw_quad.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 quad->SetNew(shared_state, | 144 quad->SetNew(shared_state, |
145 rect, | 145 rect, |
146 gfx::Rect(), | 146 gfx::Rect(), |
147 rect, | 147 rect, |
148 resource, | 148 resource, |
149 premultiplied_alpha, | 149 premultiplied_alpha, |
150 gfx::PointF(0.0f, 0.0f), // uv_top_left | 150 gfx::PointF(0.0f, 0.0f), // uv_top_left |
151 gfx::PointF(1.0f, 1.0f), // uv_bottom_right | 151 gfx::PointF(1.0f, 1.0f), // uv_bottom_right |
152 background_color, | 152 background_color, |
153 vertex_opacity, | 153 vertex_opacity, |
154 false); // flipped | 154 false, // flipped |
| 155 false); // nearest_neighbor |
155 } | 156 } |
156 | 157 |
157 typedef ::testing::Types<GLRenderer, | 158 typedef ::testing::Types<GLRenderer, |
158 SoftwareRenderer, | 159 SoftwareRenderer, |
159 GLRendererWithExpandedViewport, | 160 GLRendererWithExpandedViewport, |
160 SoftwareRendererWithExpandedViewport> RendererTypes; | 161 SoftwareRendererWithExpandedViewport> RendererTypes; |
161 TYPED_TEST_CASE(RendererPixelTest, RendererTypes); | 162 TYPED_TEST_CASE(RendererPixelTest, RendererTypes); |
162 | 163 |
163 template <typename RendererType> | 164 template <typename RendererType> |
164 class FuzzyForSoftwareOnlyPixelComparator : public PixelComparator { | 165 class FuzzyForSoftwareOnlyPixelComparator : public PixelComparator { |
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1948 gfx::Rect(), | 1949 gfx::Rect(), |
1949 gfx::Rect(this->device_viewport_size_), | 1950 gfx::Rect(this->device_viewport_size_), |
1950 resource, | 1951 resource, |
1951 true, // premultiplied_alpha | 1952 true, // premultiplied_alpha |
1952 gfx::PointF(0.0f, 0.0f), // uv_top_left | 1953 gfx::PointF(0.0f, 0.0f), // uv_top_left |
1953 gfx::PointF( // uv_bottom_right | 1954 gfx::PointF( // uv_bottom_right |
1954 this->device_viewport_size_.width() / texture_rect.width(), | 1955 this->device_viewport_size_.width() / texture_rect.width(), |
1955 this->device_viewport_size_.height() / texture_rect.height()), | 1956 this->device_viewport_size_.height() / texture_rect.height()), |
1956 SK_ColorWHITE, | 1957 SK_ColorWHITE, |
1957 vertex_opacity, | 1958 vertex_opacity, |
1958 false); // flipped | 1959 false, // flipped |
| 1960 false); // nearest_neighbor |
1959 | 1961 |
1960 RenderPassList pass_list; | 1962 RenderPassList pass_list; |
1961 pass_list.push_back(pass.Pass()); | 1963 pass_list.push_back(pass.Pass()); |
1962 | 1964 |
1963 EXPECT_TRUE(this->RunPixelTest( | 1965 EXPECT_TRUE(this->RunPixelTest( |
1964 &pass_list, | 1966 &pass_list, |
1965 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), | 1967 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), |
1966 FuzzyPixelOffByOneComparator(true))); | 1968 FuzzyPixelOffByOneComparator(true))); |
1967 } | 1969 } |
1968 | 1970 |
1969 #endif // !defined(OS_ANDROID) | 1971 #endif // !defined(OS_ANDROID) |
1970 | 1972 |
1971 } // namespace | 1973 } // namespace |
1972 } // namespace cc | 1974 } // namespace cc |
OLD | NEW |