Chromium Code Reviews| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 234 output_surface_plane.use_output_surface_for_resource = true; | 234 output_surface_plane.use_output_surface_for_resource = true; |
| 235 output_surface_plane.overlay_handled = true; | 235 output_surface_plane.overlay_handled = true; |
| 236 frame.overlay_list.push_back(output_surface_plane); | 236 frame.overlay_list.push_back(output_surface_plane); |
| 237 } | 237 } |
| 238 | 238 |
| 239 // If we have any copy requests, we can't remove any quads for overlays, | 239 // If we have any copy requests, we can't remove any quads for overlays, |
| 240 // otherwise the framebuffer will be missing the overlay contents. | 240 // otherwise the framebuffer will be missing the overlay contents. |
| 241 if (root_render_pass->copy_requests.empty()) { | 241 if (root_render_pass->copy_requests.empty()) { |
| 242 overlay_processor_->ProcessForOverlays(render_passes_in_draw_order, | 242 overlay_processor_->ProcessForOverlays(render_passes_in_draw_order, |
| 243 &frame.overlay_list); | 243 &frame.overlay_list); |
| 244 for (const OverlayCandidate& overlay : frame.overlay_list) { | |
| 245 if (overlay.plane_z_order <= 0) | |
| 246 continue; | |
| 247 | |
| 248 frame.root_damage_rect.Subtract(ToNearestRect(overlay.display_rect)); | |
|
piman
2015/10/08 22:51:31
That's only true if the overlay is opaque. Also, T
kalyank
2015/10/12 22:58:45
Moved this to processor now. I have added a bool t
kalyank
2015/10/12 22:58:45
Acknowledged.
piman
2015/10/20 01:49:19
Whatever damage you remove must be fully covered b
| |
| 249 } | |
| 244 } | 250 } |
| 245 | 251 |
| 246 for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) { | 252 for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) { |
| 247 RenderPass* pass = render_passes_in_draw_order->at(i); | 253 RenderPass* pass = render_passes_in_draw_order->at(i); |
| 248 DrawRenderPass(&frame, pass); | 254 DrawRenderPass(&frame, pass); |
| 249 | 255 |
| 250 for (ScopedPtrVector<CopyOutputRequest>::iterator it = | 256 for (ScopedPtrVector<CopyOutputRequest>::iterator it = |
| 251 pass->copy_requests.begin(); | 257 pass->copy_requests.begin(); |
| 252 it != pass->copy_requests.end(); | 258 it != pass->copy_requests.end(); |
| 253 ++it) { | 259 ++it) { |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 535 ScopedResource* texture = render_pass_textures_.get(id); | 541 ScopedResource* texture = render_pass_textures_.get(id); |
| 536 return texture && texture->id(); | 542 return texture && texture->id(); |
| 537 } | 543 } |
| 538 | 544 |
| 539 // static | 545 // static |
| 540 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { | 546 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { |
| 541 return render_pass->output_rect.size(); | 547 return render_pass->output_rect.size(); |
| 542 } | 548 } |
| 543 | 549 |
| 544 } // namespace cc | 550 } // namespace cc |
| OLD | NEW |