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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 308193003: Removed QuadSink and MockQuadCuller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumLayerImpl
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 790613a28a3512b743057018ac49a67f2b5ddcbd..5248919ea238a662faa41d94d8836d7849e7f4f1 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -32,7 +32,6 @@
#include "cc/layers/layer_impl.h"
#include "cc/layers/layer_iterator.h"
#include "cc/layers/painted_scrollbar_layer_impl.h"
-#include "cc/layers/quad_sink.h"
#include "cc/layers/render_surface_impl.h"
#include "cc/layers/scrollbar_layer_impl_base.h"
#include "cc/output/compositor_frame_metadata.h"
@@ -573,8 +572,7 @@ static void AppendQuadsForLayer(
LayerImpl* layer,
const OcclusionTracker<LayerImpl>& occlusion_tracker,
AppendQuadsData* append_quads_data) {
- QuadSink quad_culler(target_render_pass, &occlusion_tracker);
- layer->AppendQuads(&quad_culler, append_quads_data);
+ layer->AppendQuads(target_render_pass, occlusion_tracker, append_quads_data);
}
static void AppendQuadsForRenderSurfaceLayer(
@@ -583,10 +581,9 @@ static void AppendQuadsForRenderSurfaceLayer(
const RenderPass* contributing_render_pass,
const OcclusionTracker<LayerImpl>& occlusion_tracker,
AppendQuadsData* append_quads_data) {
- QuadSink quad_culler(target_render_pass, &occlusion_tracker);
-
bool is_replica = false;
- layer->render_surface()->AppendQuads(&quad_culler,
+ layer->render_surface()->AppendQuads(target_render_pass,
+ occlusion_tracker,
append_quads_data,
is_replica,
contributing_render_pass->id);
@@ -594,7 +591,8 @@ static void AppendQuadsForRenderSurfaceLayer(
// Add replica after the surface so that it appears below the surface.
if (layer->has_replica()) {
is_replica = true;
- layer->render_surface()->AppendQuads(&quad_culler,
+ layer->render_surface()->AppendQuads(target_render_pass,
+ occlusion_tracker,
append_quads_data,
is_replica,
contributing_render_pass->id);
@@ -626,8 +624,6 @@ static void AppendQuadsToFillScreen(
screen_background_color_region.Intersect(root_scroll_layer_rect);
}
- QuadSink quad_culler(target_render_pass, &occlusion_tracker);
-
// Manually create the quad state for the gutter quads, as the root layer
// doesn't have any bounds and so can't generate this itself.
// TODO(danakj): Make the gutter quads generated by the solid color layer
@@ -636,7 +632,8 @@ static void AppendQuadsToFillScreen(
gfx::Rect root_target_rect = root_layer->render_surface()->content_rect();
float opacity = 1.f;
int sorting_context_id = 0;
- SharedQuadState* shared_quad_state = quad_culler.CreateSharedQuadState();
+ SharedQuadState* shared_quad_state =
+ target_render_pass->CreateAndAppendSharedQuadState();
shared_quad_state->SetAll(gfx::Transform(),
root_target_rect.size(),
root_target_rect,
@@ -659,7 +656,7 @@ static void AppendQuadsToFillScreen(
visible_screen_space_rect,
screen_background_color,
false);
- quad_culler.Append(quad.PassAs<DrawQuad>());
+ target_render_pass->AppendDrawQuad(quad.PassAs<DrawQuad>());
}
for (Region::Iterator fill_rects(overhang_region);
fill_rects.has_rect();
@@ -687,7 +684,7 @@ static void AppendQuadsToFillScreen(
screen_background_color,
vertex_opacity,
false);
- quad_culler.Append(tex_quad.PassAs<DrawQuad>());
+ target_render_pass->AppendDrawQuad(tex_quad.PassAs<DrawQuad>());
}
}
« no previous file with comments | « cc/test/render_pass_test_utils.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698