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

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

Issue 11637032: Revert "cc: Defer texture allocation (to allow async allocations)." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/resource_provider_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_common.h" 5 #include "cc/test/render_pass_test_common.h"
6 6
7 #include "cc/checkerboard_draw_quad.h" 7 #include "cc/checkerboard_draw_quad.h"
8 #include "cc/debug_border_draw_quad.h" 8 #include "cc/debug_border_draw_quad.h"
9 #include "cc/io_surface_draw_quad.h" 9 #include "cc/io_surface_draw_quad.h"
10 #include "cc/render_pass_draw_quad.h" 10 #include "cc/render_pass_draw_quad.h"
(...skipping 11 matching lines...) Expand all
22 void TestRenderPass::AppendOneOfEveryQuadType( 22 void TestRenderPass::AppendOneOfEveryQuadType(
23 cc::ResourceProvider* resourceProvider) { 23 cc::ResourceProvider* resourceProvider) {
24 gfx::Rect rect(0, 0, 100, 100); 24 gfx::Rect rect(0, 0, 100, 100);
25 gfx::Rect opaque_rect(10, 10, 80, 80); 25 gfx::Rect opaque_rect(10, 10, 80, 80);
26 const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f}; 26 const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
27 cc::ResourceProvider::ResourceId texture_resource = 27 cc::ResourceProvider::ResourceId texture_resource =
28 resourceProvider->createResource( 28 resourceProvider->createResource(
29 gfx::Size(20, 12), 29 gfx::Size(20, 12),
30 resourceProvider->bestTextureFormat(), 30 resourceProvider->bestTextureFormat(),
31 ResourceProvider::TextureUsageAny); 31 ResourceProvider::TextureUsageAny);
32 resourceProvider->allocateForTesting(texture_resource);
33 scoped_ptr<cc::SharedQuadState> shared_state = cc::SharedQuadState::Create(); 32 scoped_ptr<cc::SharedQuadState> shared_state = cc::SharedQuadState::Create();
34 shared_state->SetAll(gfx::Transform(), 33 shared_state->SetAll(gfx::Transform(),
35 rect, 34 rect,
36 rect, 35 rect,
37 rect, 36 rect,
38 false, 37 false,
39 1); 38 1);
40 39
41 scoped_ptr<cc::CheckerboardDrawQuad> checkerboard_quad = 40 scoped_ptr<cc::CheckerboardDrawQuad> checkerboard_quad =
42 cc::CheckerboardDrawQuad::Create(); 41 cc::CheckerboardDrawQuad::Create();
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 planes[0], 166 planes[0],
168 planes[1], 167 planes[1],
169 planes[2]); 168 planes[2]);
170 AppendQuad(yuv_quad.PassAs<DrawQuad>()); 169 AppendQuad(yuv_quad.PassAs<DrawQuad>());
171 170
172 AppendSharedQuadState(transformed_state.Pass()); 171 AppendSharedQuadState(transformed_state.Pass());
173 AppendSharedQuadState(shared_state.Pass()); 172 AppendSharedQuadState(shared_state.Pass());
174 } 173 }
175 174
176 } // namespace cc 175 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resource_provider_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698