| 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/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2077 gfx::Rect rect(0, 0, 100, 100); | 2077 gfx::Rect rect(0, 0, 100, 100); |
| 2078 gfx::RectF tex_coord_rect(0, 0, 1, 1); | 2078 gfx::RectF tex_coord_rect(0, 0, 1, 1); |
| 2079 SharedQuadState* shared_state = | 2079 SharedQuadState* shared_state = |
| 2080 root_pass->CreateAndAppendSharedQuadState(); | 2080 root_pass->CreateAndAppendSharedQuadState(); |
| 2081 shared_state->SetAll(gfx::Transform(), rect.size(), rect, rect, false, 1, | 2081 shared_state->SetAll(gfx::Transform(), rect.size(), rect, rect, false, 1, |
| 2082 SkBlendMode::kSrcOver, 0); | 2082 SkBlendMode::kSrcOver, 0); |
| 2083 YUVVideoDrawQuad* quad = | 2083 YUVVideoDrawQuad* quad = |
| 2084 root_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); | 2084 root_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); |
| 2085 quad->SetNew(shared_state, rect, rect, rect, tex_coord_rect, | 2085 quad->SetNew(shared_state, rect, rect, rect, tex_coord_rect, |
| 2086 tex_coord_rect, rect.size(), rect.size(), resource_id, | 2086 tex_coord_rect, rect.size(), rect.size(), resource_id, |
| 2087 resource_id, resource_id, resource_id, | 2087 resource_id, resource_id, resource_id, 0, 1.0, 8); |
| 2088 YUVVideoDrawQuad::REC_601, gfx::ColorSpace(), 0, 1.0, 8); | |
| 2089 } | 2088 } |
| 2090 | 2089 |
| 2091 // A bunch of initialization that happens. | 2090 // A bunch of initialization that happens. |
| 2092 EXPECT_CALL(*gl, Disable(_)).Times(AnyNumber()); | 2091 EXPECT_CALL(*gl, Disable(_)).Times(AnyNumber()); |
| 2093 EXPECT_CALL(*gl, Enable(_)).Times(AnyNumber()); | 2092 EXPECT_CALL(*gl, Enable(_)).Times(AnyNumber()); |
| 2094 EXPECT_CALL(*gl, Scissor(_, _, _, _)).Times(AnyNumber()); | 2093 EXPECT_CALL(*gl, Scissor(_, _, _, _)).Times(AnyNumber()); |
| 2095 | 2094 |
| 2096 // Partial frame, we should use a scissor to swap only that part when | 2095 // Partial frame, we should use a scissor to swap only that part when |
| 2097 // partial swap is enabled. | 2096 // partial swap is enabled. |
| 2098 root_pass->damage_rect = gfx::Rect(2, 2, 3, 3); | 2097 root_pass->damage_rect = gfx::Rect(2, 2, 3, 3); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2156 renderer_->SetVisible(true); | 2155 renderer_->SetVisible(true); |
| 2157 Mock::VerifyAndClearExpectations(context_support_ptr_); | 2156 Mock::VerifyAndClearExpectations(context_support_ptr_); |
| 2158 | 2157 |
| 2159 EXPECT_CALL(*context_support_ptr_, SetAggressivelyFreeResources(true)); | 2158 EXPECT_CALL(*context_support_ptr_, SetAggressivelyFreeResources(true)); |
| 2160 renderer_->SetVisible(false); | 2159 renderer_->SetVisible(false); |
| 2161 Mock::VerifyAndClearExpectations(context_support_ptr_); | 2160 Mock::VerifyAndClearExpectations(context_support_ptr_); |
| 2162 } | 2161 } |
| 2163 | 2162 |
| 2164 } // namespace | 2163 } // namespace |
| 2165 } // namespace cc | 2164 } // namespace cc |
| OLD | NEW |