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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 quad->SetNew(shared_state, | 145 quad->SetNew(shared_state, |
146 rect, | 146 rect, |
147 gfx::Rect(), | 147 gfx::Rect(), |
148 rect, | 148 rect, |
149 resource, | 149 resource, |
150 premultiplied_alpha, | 150 premultiplied_alpha, |
151 gfx::PointF(0.0f, 0.0f), // uv_top_left | 151 gfx::PointF(0.0f, 0.0f), // uv_top_left |
152 gfx::PointF(1.0f, 1.0f), // uv_bottom_right | 152 gfx::PointF(1.0f, 1.0f), // uv_bottom_right |
153 background_color, | 153 background_color, |
154 vertex_opacity, | 154 vertex_opacity, |
155 false); // flipped | 155 false, // flipped |
| 156 false); // nearest_neighbor |
156 } | 157 } |
157 | 158 |
158 typedef ::testing::Types<GLRenderer, | 159 typedef ::testing::Types<GLRenderer, |
159 SoftwareRenderer, | 160 SoftwareRenderer, |
160 GLRendererWithExpandedViewport, | 161 GLRendererWithExpandedViewport, |
161 SoftwareRendererWithExpandedViewport> RendererTypes; | 162 SoftwareRendererWithExpandedViewport> RendererTypes; |
162 TYPED_TEST_CASE(RendererPixelTest, RendererTypes); | 163 TYPED_TEST_CASE(RendererPixelTest, RendererTypes); |
163 | 164 |
164 template <typename RendererType> | 165 template <typename RendererType> |
165 class FuzzyForSoftwareOnlyPixelComparator : public PixelComparator { | 166 class FuzzyForSoftwareOnlyPixelComparator : public PixelComparator { |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2191 gfx::Rect(), | 2192 gfx::Rect(), |
2192 gfx::Rect(this->device_viewport_size_), | 2193 gfx::Rect(this->device_viewport_size_), |
2193 resource, | 2194 resource, |
2194 true, // premultiplied_alpha | 2195 true, // premultiplied_alpha |
2195 gfx::PointF(0.0f, 0.0f), // uv_top_left | 2196 gfx::PointF(0.0f, 0.0f), // uv_top_left |
2196 gfx::PointF( // uv_bottom_right | 2197 gfx::PointF( // uv_bottom_right |
2197 this->device_viewport_size_.width() / texture_rect.width(), | 2198 this->device_viewport_size_.width() / texture_rect.width(), |
2198 this->device_viewport_size_.height() / texture_rect.height()), | 2199 this->device_viewport_size_.height() / texture_rect.height()), |
2199 SK_ColorWHITE, | 2200 SK_ColorWHITE, |
2200 vertex_opacity, | 2201 vertex_opacity, |
2201 false); // flipped | 2202 false, // flipped |
| 2203 false); // nearest_neighbor |
2202 | 2204 |
2203 RenderPassList pass_list; | 2205 RenderPassList pass_list; |
2204 pass_list.push_back(pass.Pass()); | 2206 pass_list.push_back(pass.Pass()); |
2205 | 2207 |
2206 EXPECT_TRUE(this->RunPixelTest( | 2208 EXPECT_TRUE(this->RunPixelTest( |
2207 &pass_list, | 2209 &pass_list, |
2208 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), | 2210 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), |
2209 FuzzyPixelOffByOneComparator(true))); | 2211 FuzzyPixelOffByOneComparator(true))); |
2210 } | 2212 } |
2211 | 2213 |
2212 #endif // !defined(OS_ANDROID) | 2214 #endif // !defined(OS_ANDROID) |
2213 | 2215 |
2214 } // namespace | 2216 } // namespace |
2215 } // namespace cc | 2217 } // namespace cc |
OLD | NEW |