| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 return pass.Pass(); | 43 return pass.Pass(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 scoped_ptr<SharedQuadState> CreateTestSharedQuadState( | 46 scoped_ptr<SharedQuadState> CreateTestSharedQuadState( |
| 47 gfx::Transform content_to_target_transform, gfx::Rect rect) { | 47 gfx::Transform content_to_target_transform, gfx::Rect rect) { |
| 48 const gfx::Size content_bounds = rect.size(); | 48 const gfx::Size content_bounds = rect.size(); |
| 49 const gfx::Rect visible_content_rect = rect; | 49 const gfx::Rect visible_content_rect = rect; |
| 50 const gfx::Rect clip_rect = rect; | 50 const gfx::Rect clip_rect = rect; |
| 51 const bool is_clipped = false; | 51 const bool is_clipped = false; |
| 52 const float opacity = 1.0f; | 52 const float opacity = 1.0f; |
| 53 const SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode; |
| 53 scoped_ptr<SharedQuadState> shared_state = SharedQuadState::Create(); | 54 scoped_ptr<SharedQuadState> shared_state = SharedQuadState::Create(); |
| 54 shared_state->SetAll(content_to_target_transform, | 55 shared_state->SetAll(content_to_target_transform, |
| 55 content_bounds, | 56 content_bounds, |
| 56 visible_content_rect, | 57 visible_content_rect, |
| 57 clip_rect, | 58 clip_rect, |
| 58 is_clipped, | 59 is_clipped, |
| 59 opacity); | 60 opacity, |
| 61 blend_mode); |
| 60 return shared_state.Pass(); | 62 return shared_state.Pass(); |
| 61 } | 63 } |
| 62 | 64 |
| 63 scoped_ptr<SharedQuadState> CreateTestSharedQuadStateClipped( | 65 scoped_ptr<SharedQuadState> CreateTestSharedQuadStateClipped( |
| 64 gfx::Transform content_to_target_transform, | 66 gfx::Transform content_to_target_transform, |
| 65 gfx::Rect rect, | 67 gfx::Rect rect, |
| 66 gfx::Rect clip_rect) { | 68 gfx::Rect clip_rect) { |
| 67 const gfx::Size content_bounds = rect.size(); | 69 const gfx::Size content_bounds = rect.size(); |
| 68 const gfx::Rect visible_content_rect = clip_rect; | 70 const gfx::Rect visible_content_rect = clip_rect; |
| 69 const bool is_clipped = true; | 71 const bool is_clipped = true; |
| 70 const float opacity = 1.0f; | 72 const float opacity = 1.0f; |
| 73 const SkXfermode::Mode blend_mode = SkXfermode::kSrcOver_Mode; |
| 71 scoped_ptr<SharedQuadState> shared_state = SharedQuadState::Create(); | 74 scoped_ptr<SharedQuadState> shared_state = SharedQuadState::Create(); |
| 72 shared_state->SetAll(content_to_target_transform, | 75 shared_state->SetAll(content_to_target_transform, |
| 73 content_bounds, | 76 content_bounds, |
| 74 visible_content_rect, | 77 visible_content_rect, |
| 75 clip_rect, | 78 clip_rect, |
| 76 is_clipped, | 79 is_clipped, |
| 77 opacity); | 80 opacity, |
| 81 blend_mode); |
| 78 return shared_state.Pass(); | 82 return shared_state.Pass(); |
| 79 } | 83 } |
| 80 | 84 |
| 81 scoped_ptr<DrawQuad> CreateTestRenderPassDrawQuad( | 85 scoped_ptr<DrawQuad> CreateTestRenderPassDrawQuad( |
| 82 SharedQuadState* shared_state, gfx::Rect rect, RenderPass::Id pass_id) { | 86 SharedQuadState* shared_state, gfx::Rect rect, RenderPass::Id pass_id) { |
| 83 scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); | 87 scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); |
| 84 quad->SetNew(shared_state, | 88 quad->SetNew(shared_state, |
| 85 rect, | 89 rect, |
| 86 pass_id, | 90 pass_id, |
| 87 false, // is_replica | 91 false, // is_replica |
| (...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2071 &pass_list, | 2075 &pass_list, |
| 2072 PixelTest::NoOffscreenContext, | 2076 PixelTest::NoOffscreenContext, |
| 2073 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), | 2077 base::FilePath(FILE_PATH_LITERAL("wrap_mode_repeat.png")), |
| 2074 FuzzyPixelOffByOneComparator(true))); | 2078 FuzzyPixelOffByOneComparator(true))); |
| 2075 } | 2079 } |
| 2076 | 2080 |
| 2077 #endif // !defined(OS_ANDROID) | 2081 #endif // !defined(OS_ANDROID) |
| 2078 | 2082 |
| 2079 } // namespace | 2083 } // namespace |
| 2080 } // namespace cc | 2084 } // namespace cc |
| OLD | NEW |