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

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

Issue 217313003: Stop displaying layers with non-invertible transforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests. Created 6 years, 8 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
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 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 ++it) { 806 ++it) {
807 RenderPass::Id target_render_pass_id = 807 RenderPass::Id target_render_pass_id =
808 it.target_render_surface_layer()->render_surface()->RenderPassId(); 808 it.target_render_surface_layer()->render_surface()->RenderPassId();
809 RenderPass* target_render_pass = 809 RenderPass* target_render_pass =
810 frame->render_passes_by_id[target_render_pass_id]; 810 frame->render_passes_by_id[target_render_pass_id];
811 811
812 occlusion_tracker.EnterLayer(it); 812 occlusion_tracker.EnterLayer(it);
813 813
814 AppendQuadsData append_quads_data(target_render_pass_id); 814 AppendQuadsData append_quads_data(target_render_pass_id);
815 815
816 DCHECK(it->transform_is_invertible()) << "Layer should not have been added"
avallee 2014/04/15 18:53:26 I didn't see any place where it made sense to add
avallee 2014/04/16 18:20:56 Deleted this pending part 2.
817 << " to surface";
816 if (it.represents_target_render_surface()) { 818 if (it.represents_target_render_surface()) {
817 if (it->HasCopyRequest()) { 819 if (it->HasCopyRequest()) {
818 have_copy_request = true; 820 have_copy_request = true;
819 it->TakeCopyRequestsAndTransformToTarget( 821 it->TakeCopyRequestsAndTransformToTarget(
820 &target_render_pass->copy_requests); 822 &target_render_pass->copy_requests);
821 } 823 }
822 } else if (it.represents_contributing_render_surface() && 824 } else if (it.represents_contributing_render_surface() &&
823 it->render_surface()->contributes_to_drawn_surface()) { 825 it->render_surface()->contributes_to_drawn_surface()) {
824 RenderPass::Id contributing_render_pass_id = 826 RenderPass::Id contributing_render_pass_id =
825 it->render_surface()->RenderPassId(); 827 it->render_surface()->RenderPassId();
(...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after
3101 swap_promise_monitor_.erase(monitor); 3103 swap_promise_monitor_.erase(monitor);
3102 } 3104 }
3103 3105
3104 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3106 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3105 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3107 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3106 for (; it != swap_promise_monitor_.end(); it++) 3108 for (; it != swap_promise_monitor_.end(); it++)
3107 (*it)->OnSetNeedsRedrawOnImpl(); 3109 (*it)->OnSetNeedsRedrawOnImpl();
3108 } 3110 }
3109 3111
3110 } // namespace cc 3112 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host_common_unittest.cc ('K') | « cc/trees/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698