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

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: rm unused line Created 6 years, 7 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
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 ccd970d62d096913252b2f71ab814b294de687f2..fdbe6c34e470e3157b2d7738c3dbea2b2292821e 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"
@@ -582,8 +581,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(
@@ -592,10 +590,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);
@@ -603,7 +600,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);
@@ -635,8 +633,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
@@ -644,7 +640,8 @@ static void AppendQuadsToFillScreen(
gfx::Rect root_target_rect = root_layer->render_surface()->content_rect();
float opacity = 1.f;
- 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,
@@ -666,7 +663,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();
@@ -694,7 +691,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>());
}
}

Powered by Google App Engine
This is Rietveld 408576698