| Index: cc/layers/tiled_layer_impl.cc
|
| diff --git a/cc/layers/tiled_layer_impl.cc b/cc/layers/tiled_layer_impl.cc
|
| index 0b449aec7abf5e0b29a8e64a679413807b59d222..9830703238ceeb0ea65501f6ef08298f3ec7a833 100644
|
| --- a/cc/layers/tiled_layer_impl.cc
|
| +++ b/cc/layers/tiled_layer_impl.cc
|
| @@ -9,12 +9,12 @@
|
| #include "cc/base/math_util.h"
|
| #include "cc/debug/debug_colors.h"
|
| #include "cc/layers/append_quads_data.h"
|
| -#include "cc/layers/quad_sink.h"
|
| #include "cc/quads/checkerboard_draw_quad.h"
|
| #include "cc/quads/debug_border_draw_quad.h"
|
| #include "cc/quads/solid_color_draw_quad.h"
|
| #include "cc/quads/tile_draw_quad.h"
|
| #include "cc/resources/layer_tiling_data.h"
|
| +#include "cc/trees/occlusion_tracker.h"
|
| #include "third_party/khronos/GLES2/gl2.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "ui/gfx/quad_f.h"
|
| @@ -151,17 +151,20 @@ bool TiledLayerImpl::WillDraw(DrawMode draw_mode,
|
| return LayerImpl::WillDraw(draw_mode, resource_provider);
|
| }
|
|
|
| -void TiledLayerImpl::AppendQuads(QuadSink* quad_sink,
|
| - AppendQuadsData* append_quads_data) {
|
| +void TiledLayerImpl::AppendQuads(
|
| + RenderPass* render_pass,
|
| + const OcclusionTracker<LayerImpl>& occlusion_tracker,
|
| + AppendQuadsData* append_quads_data) {
|
| DCHECK(tiler_);
|
| DCHECK(!tiler_->has_empty_bounds());
|
| DCHECK(!visible_content_rect().IsEmpty());
|
|
|
| gfx::Rect content_rect = visible_content_rect();
|
| - SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState();
|
| + SharedQuadState* shared_quad_state =
|
| + render_pass->CreateAndAppendSharedQuadState();
|
| PopulateSharedQuadState(shared_quad_state);
|
|
|
| - AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
|
| + AppendDebugBorderQuad(render_pass, shared_quad_state, append_quads_data);
|
|
|
| int left, top, right, bottom;
|
| tiler_->ContentRectToTileIndices(content_rect, &left, &top, &right, &bottom);
|
| @@ -189,7 +192,7 @@ void TiledLayerImpl::AppendQuads(QuadSink* quad_sink,
|
| visible_tile_rect,
|
| border_color,
|
| border_width);
|
| - quad_sink->Append(debug_border_quad.PassAs<DrawQuad>());
|
| + render_pass->AppendDrawQuad(debug_border_quad.PassAs<DrawQuad>());
|
| }
|
| }
|
| }
|
| @@ -208,8 +211,8 @@ void TiledLayerImpl::AppendQuads(QuadSink* quad_sink,
|
| if (tile_rect.IsEmpty())
|
| continue;
|
|
|
| - gfx::Rect visible_tile_rect =
|
| - quad_sink->UnoccludedContentRect(this, tile_rect, draw_transform());
|
| + gfx::Rect visible_tile_rect = occlusion_tracker.UnoccludedContentRect(
|
| + this->render_target(), tile_rect, draw_transform());
|
| if (visible_tile_rect.IsEmpty())
|
| continue;
|
|
|
| @@ -227,7 +230,7 @@ void TiledLayerImpl::AppendQuads(QuadSink* quad_sink,
|
| CheckerboardDrawQuad::Create();
|
| checkerboard_quad->SetNew(
|
| shared_quad_state, tile_rect, visible_tile_rect, checker_color);
|
| - quad_sink->Append(checkerboard_quad.PassAs<DrawQuad>());
|
| + render_pass->AppendDrawQuad(checkerboard_quad.PassAs<DrawQuad>());
|
| append_quads_data->num_missing_tiles++;
|
| continue;
|
| }
|
| @@ -256,7 +259,7 @@ void TiledLayerImpl::AppendQuads(QuadSink* quad_sink,
|
| tex_coord_rect,
|
| texture_size,
|
| tile->contents_swizzled());
|
| - quad_sink->Append(quad.PassAs<DrawQuad>());
|
| + render_pass->AppendDrawQuad(quad.PassAs<DrawQuad>());
|
| }
|
| }
|
| }
|
|
|