Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: cc/output/direct_renderer.cc

Issue 1408953005: Revert of Avoid Copying damage rect when using Overlays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/output/overlay_candidate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 root_render_pass->output_rect; 233 root_render_pass->output_rect;
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( 242 overlay_processor_->ProcessForOverlays(
243 resource_provider_, render_passes_in_draw_order, &frame.overlay_list, 243 resource_provider_, render_passes_in_draw_order, &frame.overlay_list);
244 &frame.root_damage_rect);
245 } 244 }
246 245
247 for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) { 246 for (size_t i = 0; i < render_passes_in_draw_order->size(); ++i) {
248 RenderPass* pass = render_passes_in_draw_order->at(i); 247 RenderPass* pass = render_passes_in_draw_order->at(i);
249 DrawRenderPass(&frame, pass); 248 DrawRenderPass(&frame, pass);
250 249
251 for (ScopedPtrVector<CopyOutputRequest>::iterator it = 250 for (ScopedPtrVector<CopyOutputRequest>::iterator it =
252 pass->copy_requests.begin(); 251 pass->copy_requests.begin();
253 it != pass->copy_requests.end(); 252 it != pass->copy_requests.end();
254 ++it) { 253 ++it) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 ScopedResource* texture = render_pass_textures_.get(id); 535 ScopedResource* texture = render_pass_textures_.get(id);
537 return texture && texture->id(); 536 return texture && texture->id();
538 } 537 }
539 538
540 // static 539 // static
541 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 540 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
542 return render_pass->output_rect.size(); 541 return render_pass->output_rect.size();
543 } 542 }
544 543
545 } // namespace cc 544 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/overlay_candidate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698