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

Unified Diff: cc/layers/surface_layer_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/layers/surface_layer_impl.h ('k') | cc/layers/texture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer_impl.cc
diff --git a/cc/layers/surface_layer_impl.cc b/cc/layers/surface_layer_impl.cc
index 6891c144850397b9274af1ca673a917047c3a1fc..6ef2431b05833c76b64e4c54571142e76f612791 100644
--- a/cc/layers/surface_layer_impl.cc
+++ b/cc/layers/surface_layer_impl.cc
@@ -5,8 +5,8 @@
#include "cc/layers/surface_layer_impl.h"
#include "cc/debug/debug_colors.h"
-#include "cc/layers/quad_sink.h"
#include "cc/quads/surface_draw_quad.h"
+#include "cc/trees/occlusion_tracker.h"
namespace cc {
@@ -36,25 +36,28 @@ void SurfaceLayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer_impl->SetSurfaceId(surface_id_);
}
-void SurfaceLayerImpl::AppendQuads(QuadSink* quad_sink,
- AppendQuadsData* append_quads_data) {
- SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState();
+void SurfaceLayerImpl::AppendQuads(
+ RenderPass* render_pass,
+ const OcclusionTracker<LayerImpl>& occlusion_tracker,
+ AppendQuadsData* append_quads_data) {
+ SharedQuadState* shared_quad_state =
+ render_pass->CreateAndAppendSharedQuadState();
PopulateSharedQuadState(shared_quad_state);
AppendDebugBorderQuad(
- quad_sink, content_bounds(), shared_quad_state, append_quads_data);
+ render_pass, content_bounds(), shared_quad_state, append_quads_data);
if (surface_id_.is_null())
return;
scoped_ptr<SurfaceDrawQuad> quad = SurfaceDrawQuad::Create();
gfx::Rect quad_rect(content_bounds());
- gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect(
+ gfx::Rect visible_quad_rect = occlusion_tracker.UnoccludedContentRect(
quad_rect, draw_properties().target_space_transform);
if (visible_quad_rect.IsEmpty())
return;
quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, surface_id_);
- quad_sink->Append(quad.PassAs<DrawQuad>());
+ render_pass->AppendDrawQuad(quad.PassAs<DrawQuad>());
}
void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color,
« no previous file with comments | « cc/layers/surface_layer_impl.h ('k') | cc/layers/texture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698