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 "cc/render_pass.h" | 5 #include "cc/render_pass.h" |
6 | 6 |
7 #include <public/WebFilterOperations.h> | 7 #include <public/WebFilterOperations.h> |
8 | 8 |
9 #include "cc/checkerboard_draw_quad.h" | 9 #include "cc/checkerboard_draw_quad.h" |
10 #include "cc/math_util.h" | 10 #include "cc/math_util.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 gfx::Rect outputRect(45, 22, 120, 13); | 42 gfx::Rect outputRect(45, 22, 120, 13); |
43 gfx::Transform transformToRoot = MathUtil::createGfxTransform(1, 0.5, 0.5, -
0.5, -1, 0); | 43 gfx::Transform transformToRoot = MathUtil::createGfxTransform(1, 0.5, 0.5, -
0.5, -1, 0); |
44 gfx::Rect damageRect(56, 123, 19, 43); | 44 gfx::Rect damageRect(56, 123, 19, 43); |
45 bool hasTransparentBackground = true; | 45 bool hasTransparentBackground = true; |
46 bool hasOcclusionFromOutsideTargetSurface = true; | 46 bool hasOcclusionFromOutsideTargetSurface = true; |
47 WebFilterOperations filters; | 47 WebFilterOperations filters; |
48 WebFilterOperations backgroundFilters; | 48 WebFilterOperations backgroundFilters; |
49 | 49 |
50 filters.append(WebFilterOperation::createGrayscaleFilter(0.2f)); | 50 filters.append(WebFilterOperation::createGrayscaleFilter(0.2f)); |
51 backgroundFilters.append(WebFilterOperation::createInvertFilter(0.2f)); | 51 backgroundFilters.append(WebFilterOperation::createInvertFilter(0.2f)); |
52 SkAutoTUnref<SkBlurImageFilter> filter(new SkBlurImageFilter(SK_Scalar1, SK_
Scalar1)); | 52 SkiaRefPtr<SkImageFilter> filter = SkiaRefPtr<SkImageFilter>::Adopt(new SkBl
urImageFilter(SK_Scalar1, SK_Scalar1)); |
53 | 53 |
54 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); | 54 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); |
55 pass->SetAll(id, | 55 pass->SetAll(id, |
56 outputRect, | 56 outputRect, |
57 damageRect, | 57 damageRect, |
58 transformToRoot, | 58 transformToRoot, |
59 hasTransparentBackground, | 59 hasTransparentBackground, |
60 hasOcclusionFromOutsideTargetSurface, | 60 hasOcclusionFromOutsideTargetSurface, |
61 filters, | 61 filters, |
62 filter, | 62 filter, |
(...skipping 20 matching lines...) Expand all Loading... |
83 EXPECT_EQ(pass->filters, copy->filters); | 83 EXPECT_EQ(pass->filters, copy->filters); |
84 EXPECT_EQ(pass->filter, copy->filter); | 84 EXPECT_EQ(pass->filter, copy->filter); |
85 EXPECT_EQ(pass->background_filters, copy->background_filters); | 85 EXPECT_EQ(pass->background_filters, copy->background_filters); |
86 EXPECT_EQ(0u, copy->quad_list.size()); | 86 EXPECT_EQ(0u, copy->quad_list.size()); |
87 | 87 |
88 EXPECT_EQ(sizeof(RenderPassSize), sizeof(RenderPass)); | 88 EXPECT_EQ(sizeof(RenderPassSize), sizeof(RenderPass)); |
89 } | 89 } |
90 | 90 |
91 } // namespace | 91 } // namespace |
92 } // namespace cc | 92 } // namespace cc |
OLD | NEW |