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/direct_renderer.h" | 5 #include "cc/output/direct_renderer.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 362 |
363 bool has_external_stencil_test = | 363 bool has_external_stencil_test = |
364 output_surface_->HasExternalStencilTest() && | 364 output_surface_->HasExternalStencilTest() && |
365 frame->current_render_pass == frame->root_render_pass; | 365 frame->current_render_pass == frame->root_render_pass; |
366 | 366 |
367 DiscardPixels(has_external_stencil_test, draw_rect_covers_full_surface); | 367 DiscardPixels(has_external_stencil_test, draw_rect_covers_full_surface); |
368 ClearFramebuffer(frame, has_external_stencil_test); | 368 ClearFramebuffer(frame, has_external_stencil_test); |
369 } | 369 } |
370 | 370 |
371 const QuadList& quad_list = render_pass->quad_list; | 371 const QuadList& quad_list = render_pass->quad_list; |
372 for (QuadList::ConstBackToFrontIterator it = quad_list.BackToFrontBegin(); | 372 for (auto it = quad_list.BackToFrontBegin(); it != quad_list.BackToFrontEnd(); |
373 it != quad_list.BackToFrontEnd(); | |
374 ++it) { | 373 ++it) { |
375 const DrawQuad& quad = *it; | 374 const DrawQuad& quad = **it; |
376 bool should_skip_quad = false; | 375 bool should_skip_quad = false; |
377 | 376 |
378 if (using_scissor_as_optimization) { | 377 if (using_scissor_as_optimization) { |
379 SetScissorStateForQuadWithRenderPassScissor( | 378 SetScissorStateForQuadWithRenderPassScissor( |
380 frame, quad, render_pass_scissor, &should_skip_quad); | 379 frame, quad, render_pass_scissor, &should_skip_quad); |
381 } else { | 380 } else { |
382 SetScissorStateForQuad(frame, quad); | 381 SetScissorStateForQuad(frame, quad); |
383 } | 382 } |
384 | 383 |
385 if (!should_skip_quad) | 384 if (!should_skip_quad) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 ScopedResource* texture = render_pass_textures_.get(id); | 419 ScopedResource* texture = render_pass_textures_.get(id); |
421 return texture && texture->id(); | 420 return texture && texture->id(); |
422 } | 421 } |
423 | 422 |
424 // static | 423 // static |
425 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 424 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
426 return render_pass->output_rect.size(); | 425 return render_pass->output_rect.size(); |
427 } | 426 } |
428 | 427 |
429 } // namespace cc | 428 } // namespace cc |
OLD | NEW |