| 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_common.h" | 5 #include "cc/test/render_pass_test_common.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "cc/quads/checkerboard_draw_quad.h" | 8 #include "cc/quads/checkerboard_draw_quad.h" |
| 9 #include "cc/quads/debug_border_draw_quad.h" | 9 #include "cc/quads/debug_border_draw_quad.h" |
| 10 #include "cc/quads/io_surface_draw_quad.h" | 10 #include "cc/quads/io_surface_draw_quad.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 GL_CLAMP_TO_EDGE, | 51 GL_CLAMP_TO_EDGE, |
| 52 ResourceProvider::TextureHintImmutable, | 52 ResourceProvider::TextureHintImmutable, |
| 53 resource_provider->best_texture_format()); | 53 resource_provider->best_texture_format()); |
| 54 resource_provider->AllocateForTesting(resource3); | 54 resource_provider->AllocateForTesting(resource3); |
| 55 ResourceProvider::ResourceId resource4 = resource_provider->CreateResource( | 55 ResourceProvider::ResourceId resource4 = resource_provider->CreateResource( |
| 56 gfx::Size(56, 12), | 56 gfx::Size(56, 12), |
| 57 GL_CLAMP_TO_EDGE, | 57 GL_CLAMP_TO_EDGE, |
| 58 ResourceProvider::TextureHintImmutable, | 58 ResourceProvider::TextureHintImmutable, |
| 59 resource_provider->best_texture_format()); | 59 resource_provider->best_texture_format()); |
| 60 resource_provider->AllocateForTesting(resource4); | 60 resource_provider->AllocateForTesting(resource4); |
| 61 gfx::Size resource5_size(73, 26); |
| 61 ResourceProvider::ResourceId resource5 = resource_provider->CreateResource( | 62 ResourceProvider::ResourceId resource5 = resource_provider->CreateResource( |
| 62 gfx::Size(73, 26), | 63 resource5_size, |
| 63 GL_CLAMP_TO_EDGE, | 64 GL_CLAMP_TO_EDGE, |
| 64 ResourceProvider::TextureHintImmutable, | 65 ResourceProvider::TextureHintImmutable, |
| 65 resource_provider->best_texture_format()); | 66 resource_provider->best_texture_format()); |
| 66 resource_provider->AllocateForTesting(resource5); | 67 resource_provider->AllocateForTesting(resource5); |
| 67 ResourceProvider::ResourceId resource6 = resource_provider->CreateResource( | 68 ResourceProvider::ResourceId resource6 = resource_provider->CreateResource( |
| 68 gfx::Size(64, 92), | 69 gfx::Size(64, 92), |
| 69 GL_CLAMP_TO_EDGE, | 70 GL_CLAMP_TO_EDGE, |
| 70 ResourceProvider::TextureHintImmutable, | 71 ResourceProvider::TextureHintImmutable, |
| 71 resource_provider->best_texture_format()); | 72 resource_provider->best_texture_format()); |
| 72 resource_provider->AllocateForTesting(resource6); | 73 resource_provider->AllocateForTesting(resource6); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 IOSurfaceDrawQuad::FLIPPED); | 118 IOSurfaceDrawQuad::FLIPPED); |
| 118 | 119 |
| 119 if (child_pass.layer_id) { | 120 if (child_pass.layer_id) { |
| 120 RenderPassDrawQuad* render_pass_quad = | 121 RenderPassDrawQuad* render_pass_quad = |
| 121 this->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 122 this->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 122 render_pass_quad->SetNew(shared_state, | 123 render_pass_quad->SetNew(shared_state, |
| 123 rect, | 124 rect, |
| 124 visible_rect, | 125 visible_rect, |
| 125 child_pass, | 126 child_pass, |
| 126 resource5, | 127 resource5, |
| 127 gfx::RectF(), | 128 gfx::Vector2dF(1.f, 1.f), |
| 129 resource5_size, |
| 128 FilterOperations(), | 130 FilterOperations(), |
| 129 gfx::Vector2dF(), | 131 gfx::Vector2dF(), |
| 130 FilterOperations()); | 132 FilterOperations()); |
| 131 | 133 |
| 132 RenderPassDrawQuad* render_pass_replica_quad = | 134 RenderPassDrawQuad* render_pass_replica_quad = |
| 133 this->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 135 this->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 134 render_pass_replica_quad->SetNew(shared_state, | 136 render_pass_replica_quad->SetNew(shared_state, |
| 135 rect, | 137 rect, |
| 136 visible_rect, | 138 visible_rect, |
| 137 child_pass, | 139 child_pass, |
| 138 resource5, | 140 resource5, |
| 139 gfx::RectF(), | 141 gfx::Vector2dF(1.f, 1.f), |
| 142 resource5_size, |
| 140 FilterOperations(), | 143 FilterOperations(), |
| 141 gfx::Vector2dF(), | 144 gfx::Vector2dF(), |
| 142 FilterOperations()); | 145 FilterOperations()); |
| 143 } | 146 } |
| 144 | 147 |
| 145 SolidColorDrawQuad* solid_color_quad = | 148 SolidColorDrawQuad* solid_color_quad = |
| 146 this->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 149 this->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
| 147 solid_color_quad->SetNew( | 150 solid_color_quad->SetNew( |
| 148 shared_state, rect, visible_rect, SK_ColorRED, false); | 151 shared_state, rect, visible_rect, SK_ColorRED, false); |
| 149 | 152 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 visible_rect, | 253 visible_rect, |
| 251 gfx::RectF(0, 0, 100, 100), | 254 gfx::RectF(0, 0, 100, 100), |
| 252 plane_resources[0], | 255 plane_resources[0], |
| 253 plane_resources[1], | 256 plane_resources[1], |
| 254 plane_resources[2], | 257 plane_resources[2], |
| 255 plane_resources[3], | 258 plane_resources[3], |
| 256 color_space); | 259 color_space); |
| 257 } | 260 } |
| 258 | 261 |
| 259 } // namespace cc | 262 } // namespace cc |
| OLD | NEW |