| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 } else { | 302 } else { |
| 303 DrawRenderPassAndExecuteCopyRequests(&frame, root_render_pass); | 303 DrawRenderPassAndExecuteCopyRequests(&frame, root_render_pass); |
| 304 } | 304 } |
| 305 | 305 |
| 306 FinishDrawingFrame(&frame); | 306 FinishDrawingFrame(&frame); |
| 307 render_passes_in_draw_order->clear(); | 307 render_passes_in_draw_order->clear(); |
| 308 } | 308 } |
| 309 | 309 |
| 310 void DirectRenderer::ReadbackSwappedOverlayTextures( |
| 311 std::vector<SkBitmap>* bitmaps, |
| 312 const base::Callback<void(bool)>& callback) { |
| 313 callback.Run(false); |
| 314 } |
| 315 |
| 310 gfx::Rect DirectRenderer::ComputeScissorRectForRenderPass( | 316 gfx::Rect DirectRenderer::ComputeScissorRectForRenderPass( |
| 311 const DrawingFrame* frame) { | 317 const DrawingFrame* frame) { |
| 312 if (frame->current_render_pass == frame->root_render_pass) | 318 if (frame->current_render_pass == frame->root_render_pass) |
| 313 return frame->root_damage_rect; | 319 return frame->root_damage_rect; |
| 314 | 320 |
| 315 // If the root damage rect has been expanded due to overlays, all the other | 321 // If the root damage rect has been expanded due to overlays, all the other |
| 316 // damage rect calculations are incorrect. | 322 // damage rect calculations are incorrect. |
| 317 if (!frame->root_render_pass->damage_rect.Contains(frame->root_damage_rect)) | 323 if (!frame->root_render_pass->damage_rect.Contains(frame->root_damage_rect)) |
| 318 return frame->current_render_pass->output_rect; | 324 return frame->current_render_pass->output_rect; |
| 319 | 325 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 auto iter = render_pass_textures_.find(id); | 578 auto iter = render_pass_textures_.find(id); |
| 573 return iter != render_pass_textures_.end() && iter->second->id(); | 579 return iter != render_pass_textures_.end() && iter->second->id(); |
| 574 } | 580 } |
| 575 | 581 |
| 576 // static | 582 // static |
| 577 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 583 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
| 578 return render_pass->output_rect.size(); | 584 return render_pass->output_rect.size(); |
| 579 } | 585 } |
| 580 | 586 |
| 581 } // namespace cc | 587 } // namespace cc |
| OLD | NEW |