Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Side by Side Diff: cc/test/render_pass_test_utils.cc

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Rebasing... Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/resources/video_resource_updater_unittest.cc ('k') | cc/test/test_web_graphics_context_3d.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698