OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 #include "cc/layers/solid_color_layer.h" | 6 #include "cc/layers/solid_color_layer.h" |
7 #include "cc/test/layer_tree_pixel_test.h" | 7 #include "cc/test/layer_tree_pixel_test.h" |
8 #include "cc/test/pixel_comparator.h" | 8 #include "cc/test/pixel_comparator.h" |
9 #include "third_party/skia/include/effects/SkColorFilterImageFilter.h" | 9 #include "third_party/skia/include/effects/SkColorFilterImageFilter.h" |
10 #include "third_party/skia/include/effects/SkColorMatrixFilter.h" | 10 #include "third_party/skia/include/effects/SkColorMatrixFilter.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 #endif | 152 #endif |
153 | 153 |
154 RunPixelTest(GL_WITH_BITMAP, | 154 RunPixelTest(GL_WITH_BITMAP, |
155 background, | 155 background, |
156 base::FilePath(FILE_PATH_LITERAL( | 156 base::FilePath(FILE_PATH_LITERAL( |
157 "background_filter_blur_off_axis.png"))); | 157 "background_filter_blur_off_axis.png"))); |
158 } | 158 } |
159 | 159 |
160 class LayerTreeHostFiltersScaledPixelTest | 160 class LayerTreeHostFiltersScaledPixelTest |
161 : public LayerTreeHostFiltersPixelTest { | 161 : public LayerTreeHostFiltersPixelTest { |
162 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { | 162 virtual void InitializeSettings(LayerTreeSettings* settings) override { |
163 // Required so that device scale is inherited by content scale. | 163 // Required so that device scale is inherited by content scale. |
164 settings->layer_transforms_should_scale_layer_contents = true; | 164 settings->layer_transforms_should_scale_layer_contents = true; |
165 } | 165 } |
166 | 166 |
167 virtual void SetupTree() OVERRIDE { | 167 virtual void SetupTree() override { |
168 layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_); | 168 layer_tree_host()->SetDeviceScaleFactor(device_scale_factor_); |
169 LayerTreePixelTest::SetupTree(); | 169 LayerTreePixelTest::SetupTree(); |
170 } | 170 } |
171 | 171 |
172 protected: | 172 protected: |
173 void RunPixelTestType(int content_size, | 173 void RunPixelTestType(int content_size, |
174 float device_scale_factor, | 174 float device_scale_factor, |
175 PixelTestType test_type) { | 175 PixelTestType test_type) { |
176 int half_content = content_size / 2; | 176 int half_content = content_size / 2; |
177 | 177 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 } | 282 } |
283 | 283 |
284 TEST_F(ImageFilterClippedPixelTest, ImageFilterClipped_Software) { | 284 TEST_F(ImageFilterClippedPixelTest, ImageFilterClipped_Software) { |
285 RunPixelTestType(SOFTWARE_WITH_BITMAP); | 285 RunPixelTestType(SOFTWARE_WITH_BITMAP); |
286 } | 286 } |
287 | 287 |
288 } // namespace | 288 } // namespace |
289 } // namespace cc | 289 } // namespace cc |
290 | 290 |
291 #endif // OS_ANDROID | 291 #endif // OS_ANDROID |
OLD | NEW |