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/test/render_pass_test_utils.h" | 5 #include "cc/test/render_pass_test_utils.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "cc/quads/debug_border_draw_quad.h" | 10 #include "cc/quads/debug_border_draw_quad.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 void AddOneOfEveryQuadType(RenderPass* to_pass, | 152 void AddOneOfEveryQuadType(RenderPass* to_pass, |
153 ResourceProvider* resource_provider, | 153 ResourceProvider* resource_provider, |
154 RenderPassId child_pass, | 154 RenderPassId child_pass, |
155 gpu::SyncToken* sync_token_for_mailbox_tebxture) { | 155 gpu::SyncToken* sync_token_for_mailbox_tebxture) { |
156 gfx::Rect rect(0, 0, 100, 100); | 156 gfx::Rect rect(0, 0, 100, 100); |
157 gfx::Rect opaque_rect(10, 10, 80, 80); | 157 gfx::Rect opaque_rect(10, 10, 80, 80); |
158 gfx::Rect visible_rect(0, 0, 100, 100); | 158 gfx::Rect visible_rect(0, 0, 100, 100); |
159 const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f}; | 159 const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f}; |
160 | 160 |
161 static const gpu::SyncToken kSyncTokenForMailboxTextureQuad( | 161 static const gpu::SyncToken kSyncTokenForMailboxTextureQuad( |
162 gpu::CommandBufferNamespace::GPU_IO, 0, 0x123, 30); | 162 gpu::CommandBufferNamespace::GPU_IO, 0, |
| 163 gpu::CommandBufferId::FromUnsafeValue(0x123), 30); |
163 *sync_token_for_mailbox_tebxture = kSyncTokenForMailboxTextureQuad; | 164 *sync_token_for_mailbox_tebxture = kSyncTokenForMailboxTextureQuad; |
164 | 165 |
165 ResourceId resource1 = resource_provider->CreateResource( | 166 ResourceId resource1 = resource_provider->CreateResource( |
166 gfx::Size(45, 5), ResourceProvider::TEXTURE_HINT_IMMUTABLE, | 167 gfx::Size(45, 5), ResourceProvider::TEXTURE_HINT_IMMUTABLE, |
167 resource_provider->best_texture_format()); | 168 resource_provider->best_texture_format()); |
168 resource_provider->AllocateForTesting(resource1); | 169 resource_provider->AllocateForTesting(resource1); |
169 ResourceId resource2 = resource_provider->CreateResource( | 170 ResourceId resource2 = resource_provider->CreateResource( |
170 gfx::Size(346, 61), ResourceProvider::TEXTURE_HINT_IMMUTABLE, | 171 gfx::Size(346, 61), ResourceProvider::TEXTURE_HINT_IMMUTABLE, |
171 resource_provider->best_texture_format()); | 172 resource_provider->best_texture_format()); |
172 resource_provider->AllocateForTesting(resource2); | 173 resource_provider->AllocateForTesting(resource2); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 to_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); | 296 to_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); |
296 yuv_quad->SetNew(shared_state2, rect, opaque_rect, visible_rect, | 297 yuv_quad->SetNew(shared_state2, rect, opaque_rect, visible_rect, |
297 gfx::RectF(.0f, .0f, 100.0f, 100.0f), | 298 gfx::RectF(.0f, .0f, 100.0f, 100.0f), |
298 gfx::RectF(.0f, .0f, 50.0f, 50.0f), gfx::Size(100, 100), | 299 gfx::RectF(.0f, .0f, 50.0f, 50.0f), gfx::Size(100, 100), |
299 gfx::Size(50, 50), plane_resources[0], plane_resources[1], | 300 gfx::Size(50, 50), plane_resources[0], plane_resources[1], |
300 plane_resources[2], plane_resources[3], color_space, 0.0, | 301 plane_resources[2], plane_resources[3], color_space, 0.0, |
301 1.0); | 302 1.0); |
302 } | 303 } |
303 | 304 |
304 } // namespace cc | 305 } // namespace cc |
OLD | NEW |