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

Side by Side Diff: cc/test/layer_test_common.cc

Issue 205503002: cc: Apply occlusion before creating quads in RenderSurfaceImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 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/test/layer_test_common.h" 5 #include "cc/test/layer_test_common.h"
6 6
7 #include "cc/base/math_util.h" 7 #include "cc/base/math_util.h"
8 #include "cc/base/region.h" 8 #include "cc/base/region.h"
9 #include "cc/layers/append_quads_data.h" 9 #include "cc/layers/append_quads_data.h"
10 #include "cc/quads/draw_quad.h" 10 #include "cc/quads/draw_quad.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 const gfx::Rect& occluded) { 113 const gfx::Rect& occluded) {
114 AppendQuadsData data; 114 AppendQuadsData data;
115 115
116 quad_culler_.clear_lists(); 116 quad_culler_.clear_lists();
117 quad_culler_.set_occluded_content_rect(occluded); 117 quad_culler_.set_occluded_content_rect(occluded);
118 layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider()); 118 layer_impl->WillDraw(DRAW_MODE_HARDWARE, resource_provider());
119 layer_impl->AppendQuads(&quad_culler_, &data); 119 layer_impl->AppendQuads(&quad_culler_, &data);
120 layer_impl->DidDraw(resource_provider()); 120 layer_impl->DidDraw(resource_provider());
121 } 121 }
122 122
123 void LayerTestCommon::LayerImplTest::AppendSurfaceQuadsWithOcclusion(
124 RenderSurfaceImpl* surface_impl,
125 const gfx::Rect& occluded) {
126 AppendQuadsData data;
127
128 quad_culler_.clear_lists();
129 quad_culler_.set_occluded_content_rect(occluded);
130 bool for_replica = false;
131 RenderPass::Id id(1, 1);
132 surface_impl->AppendQuads(&quad_culler_, &data, for_replica, id);
133 }
134
123 } // namespace cc 135 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698