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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 17335011: cc: Allow output readback/copy requests to specify a sub-rect to copy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copy-subrect: 3 patches in one Created 7 years, 6 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 frame->render_passes_by_id[target_render_pass_id]; 634 frame->render_passes_by_id[target_render_pass_id];
635 635
636 bool prevent_occlusion = it.target_render_surface_layer()->HasCopyRequest(); 636 bool prevent_occlusion = it.target_render_surface_layer()->HasCopyRequest();
637 occlusion_tracker.EnterLayer(it, prevent_occlusion); 637 occlusion_tracker.EnterLayer(it, prevent_occlusion);
638 638
639 AppendQuadsData append_quads_data(target_render_pass->id); 639 AppendQuadsData append_quads_data(target_render_pass->id);
640 640
641 if (it.represents_target_render_surface()) { 641 if (it.represents_target_render_surface()) {
642 if (it->HasCopyRequest()) { 642 if (it->HasCopyRequest()) {
643 have_copy_request = true; 643 have_copy_request = true;
644 it->TakeCopyRequests(&target_render_pass->copy_requests); 644 it->TakeCopyRequestsAndTransformToTarget(
645 &target_render_pass->copy_requests);
645 } 646 }
646 } else if (it.represents_contributing_render_surface()) { 647 } else if (it.represents_contributing_render_surface()) {
647 RenderPass::Id contributing_render_pass_id = 648 RenderPass::Id contributing_render_pass_id =
648 it->render_surface()->RenderPassId(); 649 it->render_surface()->RenderPassId();
649 RenderPass* contributing_render_pass = 650 RenderPass* contributing_render_pass =
650 frame->render_passes_by_id[contributing_render_pass_id]; 651 frame->render_passes_by_id[contributing_render_pass_id];
651 AppendQuadsForRenderSurfaceLayer(target_render_pass, 652 AppendQuadsForRenderSurfaceLayer(target_render_pass,
652 *it, 653 *it,
653 contributing_render_pass, 654 contributing_render_pass,
654 occlusion_tracker, 655 occlusion_tracker,
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 } 2338 }
2338 2339
2339 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { 2340 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) {
2340 if (debug_state_.continuous_painting != debug_state.continuous_painting) 2341 if (debug_state_.continuous_painting != debug_state.continuous_painting)
2341 paint_time_counter_->ClearHistory(); 2342 paint_time_counter_->ClearHistory();
2342 2343
2343 debug_state_ = debug_state; 2344 debug_state_ = debug_state;
2344 } 2345 }
2345 2346
2346 } // namespace cc 2347 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/solid_color_content_layer_client.cc ('k') | cc/trees/layer_tree_host_pixeltest_filters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698