| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 } else { | 335 } else { |
| 336 DrawRenderPassAndExecuteCopyRequests(&frame, root_render_pass); | 336 DrawRenderPassAndExecuteCopyRequests(&frame, root_render_pass); |
| 337 } | 337 } |
| 338 | 338 |
| 339 FinishDrawingFrame(&frame); | 339 FinishDrawingFrame(&frame); |
| 340 render_passes_in_draw_order->clear(); | 340 render_passes_in_draw_order->clear(); |
| 341 render_pass_filters_.clear(); | 341 render_pass_filters_.clear(); |
| 342 render_pass_background_filters_.clear(); | 342 render_pass_background_filters_.clear(); |
| 343 } | 343 } |
| 344 | 344 |
| 345 void DirectRenderer::ReadbackSwappedOverlayTextures( |
| 346 std::vector<SkBitmap>* bitmaps, |
| 347 const base::Callback<void(bool)>& callback) { |
| 348 callback.Run(false); |
| 349 } |
| 350 |
| 345 gfx::Rect DirectRenderer::ComputeScissorRectForRenderPass( | 351 gfx::Rect DirectRenderer::ComputeScissorRectForRenderPass( |
| 346 const DrawingFrame* frame) { | 352 const DrawingFrame* frame) { |
| 347 if (frame->current_render_pass == frame->root_render_pass) | 353 if (frame->current_render_pass == frame->root_render_pass) |
| 348 return frame->root_damage_rect; | 354 return frame->root_damage_rect; |
| 349 | 355 |
| 350 // If the root damage rect has been expanded due to overlays, all the other | 356 // If the root damage rect has been expanded due to overlays, all the other |
| 351 // damage rect calculations are incorrect. | 357 // damage rect calculations are incorrect. |
| 352 if (!frame->root_render_pass->damage_rect.Contains(frame->root_damage_rect)) | 358 if (!frame->root_render_pass->damage_rect.Contains(frame->root_damage_rect)) |
| 353 return frame->current_render_pass->output_rect; | 359 return frame->current_render_pass->output_rect; |
| 354 | 360 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 auto iter = render_pass_textures_.find(render_pass_id); | 635 auto iter = render_pass_textures_.find(render_pass_id); |
| 630 return iter != render_pass_textures_.end() && iter->second->id(); | 636 return iter != render_pass_textures_.end() && iter->second->id(); |
| 631 } | 637 } |
| 632 | 638 |
| 633 // static | 639 // static |
| 634 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 640 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
| 635 return render_pass->output_rect.size(); | 641 return render_pass->output_rect.size(); |
| 636 } | 642 } |
| 637 | 643 |
| 638 } // namespace cc | 644 } // namespace cc |
| OLD | NEW |