diff options
26 files changed, 74 insertions, 101 deletions
diff --git a/cc/layers/delegated_renderer_layer_impl.cc b/cc/layers/delegated_renderer_layer_impl.cc index 31b5292..d050333 100644 --- a/cc/layers/delegated_renderer_layer_impl.cc +++ b/cc/layers/delegated_renderer_layer_impl.cc @@ -366,7 +366,7 @@ void DelegatedRendererLayerImpl::AppendRainbowDebugBorder( scoped_ptr<SolidColorDrawQuad> top_quad = SolidColorDrawQuad::Create(); top_quad->SetNew( shared_quad_state, top, top, colors[i % kNumColors], false); - quad_sink->Append(top_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(top_quad.PassAs<DrawQuad>()); scoped_ptr<SolidColorDrawQuad> bottom_quad = SolidColorDrawQuad::Create(); bottom_quad->SetNew(shared_quad_state, @@ -374,7 +374,7 @@ void DelegatedRendererLayerImpl::AppendRainbowDebugBorder( bottom, colors[kNumColors - 1 - (i % kNumColors)], false); - quad_sink->Append(bottom_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(bottom_quad.PassAs<DrawQuad>()); } if (!left.IsEmpty()) { scoped_ptr<SolidColorDrawQuad> left_quad = SolidColorDrawQuad::Create(); @@ -383,12 +383,12 @@ void DelegatedRendererLayerImpl::AppendRainbowDebugBorder( left, colors[kNumColors - 1 - (i % kNumColors)], false); - quad_sink->Append(left_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(left_quad.PassAs<DrawQuad>()); scoped_ptr<SolidColorDrawQuad> right_quad = SolidColorDrawQuad::Create(); right_quad->SetNew( shared_quad_state, right, right, colors[i % kNumColors], false); - quad_sink->Append(right_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(right_quad.PassAs<DrawQuad>()); } } } @@ -471,7 +471,7 @@ void DelegatedRendererLayerImpl::AppendRenderPassQuads( } if (output_quad) - quad_sink->Append(output_quad.Pass(), append_quads_data); + quad_sink->Append(output_quad.Pass()); } } diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc index f398894..84a862f 100644 --- a/cc/layers/delegated_renderer_layer_impl_unittest.cc +++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc @@ -5,7 +5,6 @@ #include "cc/layers/delegated_renderer_layer_impl.h" #include "cc/base/scoped_ptr_vector.h" -#include "cc/layers/append_quads_data.h" #include "cc/layers/quad_sink.h" #include "cc/layers/solid_color_layer_impl.h" #include "cc/quads/render_pass_draw_quad.h" @@ -539,7 +538,6 @@ class DelegatedRendererLayerImplTestTransform child_pass_rect, gfx::Transform()); MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); - AppendQuadsData data(pass->id); SharedQuadState* shared_quad_state = quad_sink.UseSharedQuadState( SharedQuadState::Create()); shared_quad_state->SetAll(child_pass_transform, @@ -557,7 +555,7 @@ class DelegatedRendererLayerImplTestTransform gfx::Rect(20, 20, 3, 7), 1u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); color_quad = SolidColorDrawQuad::Create(); color_quad->SetNew(shared_quad_state, @@ -565,7 +563,7 @@ class DelegatedRendererLayerImplTestTransform gfx::Rect(23, 20, 4, 7), 1u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); } gfx::Size root_pass_content_bounds(100, 100); @@ -582,7 +580,6 @@ class DelegatedRendererLayerImplTestTransform root_pass_rect, gfx::Transform()); MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); - AppendQuadsData data(pass->id); SharedQuadState* shared_quad_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); shared_quad_state->SetAll(root_pass_transform, @@ -606,7 +603,7 @@ class DelegatedRendererLayerImplTestTransform gfx::RectF(), // mask_uv_rect FilterOperations(), // filters FilterOperations()); // background_filters - quad_sink.Append(render_pass_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(render_pass_quad.PassAs<DrawQuad>()); scoped_ptr<SolidColorDrawQuad> color_quad; color_quad = SolidColorDrawQuad::Create(); @@ -615,7 +612,7 @@ class DelegatedRendererLayerImplTestTransform gfx::Rect(0, 0, 10, 10), 1u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); color_quad = SolidColorDrawQuad::Create(); color_quad->SetNew(shared_quad_state, @@ -623,7 +620,7 @@ class DelegatedRendererLayerImplTestTransform gfx::Rect(0, 10, 10, 10), 2u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); color_quad = SolidColorDrawQuad::Create(); color_quad->SetNew(shared_quad_state, @@ -631,7 +628,7 @@ class DelegatedRendererLayerImplTestTransform gfx::Rect(10, 0, 10, 10), 3u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); color_quad = SolidColorDrawQuad::Create(); color_quad->SetNew(shared_quad_state, @@ -639,7 +636,7 @@ class DelegatedRendererLayerImplTestTransform gfx::Rect(10, 10, 10, 10), 4u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); delegated_renderer_layer->SetFrameDataForRenderPasses( &delegated_render_passes); @@ -972,7 +969,6 @@ class DelegatedRendererLayerImplTestClip child_pass_rect, gfx::Transform()); MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); - AppendQuadsData data(pass->id); SharedQuadState* shared_quad_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); shared_quad_state->SetAll(child_pass_transform, @@ -990,7 +986,7 @@ class DelegatedRendererLayerImplTestClip gfx::Rect(20, 20, 3, 7), 1u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); color_quad = SolidColorDrawQuad::Create(); color_quad->SetNew(shared_quad_state, @@ -998,7 +994,7 @@ class DelegatedRendererLayerImplTestClip gfx::Rect(23, 20, 4, 7), 1u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); } gfx::Size root_pass_content_bounds(50, 50); @@ -1013,7 +1009,6 @@ class DelegatedRendererLayerImplTestClip root_pass_rect, gfx::Transform()); MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); - AppendQuadsData data(pass->id); SharedQuadState* shared_quad_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); shared_quad_state->SetAll(root_pass_transform, @@ -1037,7 +1032,7 @@ class DelegatedRendererLayerImplTestClip gfx::RectF(), // mask_uv_rect FilterOperations(), // filters FilterOperations()); // background_filters - quad_sink.Append(render_pass_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(render_pass_quad.PassAs<DrawQuad>()); scoped_ptr<SolidColorDrawQuad> color_quad; color_quad = SolidColorDrawQuad::Create(); @@ -1046,7 +1041,7 @@ class DelegatedRendererLayerImplTestClip gfx::Rect(0, 0, 10, 10), 1u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); color_quad = SolidColorDrawQuad::Create(); color_quad->SetNew(shared_quad_state, @@ -1054,7 +1049,7 @@ class DelegatedRendererLayerImplTestClip gfx::Rect(0, 10, 10, 10), 2u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); color_quad = SolidColorDrawQuad::Create(); color_quad->SetNew(shared_quad_state, @@ -1062,7 +1057,7 @@ class DelegatedRendererLayerImplTestClip gfx::Rect(10, 0, 10, 10), 3u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); color_quad = SolidColorDrawQuad::Create(); color_quad->SetNew(shared_quad_state, @@ -1070,7 +1065,7 @@ class DelegatedRendererLayerImplTestClip gfx::Rect(10, 10, 10, 10), 4u, false); - quad_sink.Append(color_quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(color_quad.PassAs<DrawQuad>()); delegated_renderer_layer->SetFrameDataForRenderPasses( &delegated_render_passes); diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc index 27229fa..e62638e 100644 --- a/cc/layers/heads_up_display_layer_impl.cc +++ b/cc/layers/heads_up_display_layer_impl.cc @@ -133,7 +133,7 @@ void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } void HeadsUpDisplayLayerImpl::UpdateHudTexture( diff --git a/cc/layers/io_surface_layer_impl.cc b/cc/layers/io_surface_layer_impl.cc index 8779086..2b842d3 100644 --- a/cc/layers/io_surface_layer_impl.cc +++ b/cc/layers/io_surface_layer_impl.cc @@ -122,7 +122,7 @@ void IOSurfaceLayerImpl::AppendQuads(QuadSink* quad_sink, io_surface_size_, io_surface_resource_id_, IOSurfaceDrawQuad::FLIPPED); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } void IOSurfaceLayerImpl::ReleaseResources() { diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc index 79505ce..6aaccc2 100644 --- a/cc/layers/layer_impl.cc +++ b/cc/layers/layer_impl.cc @@ -310,7 +310,7 @@ void LayerImpl::AppendDebugBorderQuad(QuadSink* quad_sink, DebugBorderDrawQuad::Create(); debug_border_quad->SetNew( shared_quad_state, quad_rect, visible_quad_rect, color, width); - quad_sink->Append(debug_border_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(debug_border_quad.PassAs<DrawQuad>()); } bool LayerImpl::HasDelegatedContent() const { diff --git a/cc/layers/nine_patch_layer_impl.cc b/cc/layers/nine_patch_layer_impl.cc index 4d36446..c3cefb6 100644 --- a/cc/layers/nine_patch_layer_impl.cc +++ b/cc/layers/nine_patch_layer_impl.cc @@ -232,7 +232,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); quad = TextureDrawQuad::Create(); quad->SetNew(shared_quad_state, @@ -246,7 +246,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); quad = TextureDrawQuad::Create(); quad->SetNew(shared_quad_state, @@ -260,7 +260,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); quad = TextureDrawQuad::Create(); quad->SetNew(shared_quad_state, @@ -274,7 +274,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); quad = TextureDrawQuad::Create(); quad->SetNew(shared_quad_state, @@ -288,7 +288,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); quad = TextureDrawQuad::Create(); quad->SetNew(shared_quad_state, @@ -302,7 +302,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); quad = TextureDrawQuad::Create(); quad->SetNew(shared_quad_state, @@ -316,7 +316,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); quad = TextureDrawQuad::Create(); quad->SetNew(shared_quad_state, @@ -330,7 +330,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); if (fill_center_) { quad = TextureDrawQuad::Create(); @@ -345,7 +345,7 @@ void NinePatchLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } } diff --git a/cc/layers/painted_scrollbar_layer_impl.cc b/cc/layers/painted_scrollbar_layer_impl.cc index bddd7e1..bd992e9 100644 --- a/cc/layers/painted_scrollbar_layer_impl.cc +++ b/cc/layers/painted_scrollbar_layer_impl.cc @@ -105,7 +105,7 @@ void PaintedScrollbarLayerImpl::AppendQuads( SK_ColorTRANSPARENT, opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } gfx::Rect track_quad_rect = content_bounds_rect; @@ -125,7 +125,7 @@ void PaintedScrollbarLayerImpl::AppendQuads( SK_ColorTRANSPARENT, opacity, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } } diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc index a2b5ca3..91128e9 100644 --- a/cc/layers/picture_layer_impl.cc +++ b/cc/layers/picture_layer_impl.cc @@ -157,7 +157,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, quad_content_rect, contents_scale, pile_); - if (quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data)) + if (quad_sink->Append(quad.PassAs<DrawQuad>())) append_quads_data->num_missing_tiles++; return; } @@ -207,8 +207,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, visible_geometry_rect, color, width); - quad_sink->Append(debug_border_quad.PassAs<DrawQuad>(), - append_quads_data); + quad_sink->Append(debug_border_quad.PassAs<DrawQuad>()); } } @@ -229,7 +228,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, SkColor color = DebugColors::DefaultCheckerboardColor(); quad->SetNew( shared_quad_state, geometry_rect, visible_geometry_rect, color); - if (quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data)) + if (quad_sink->Append(quad.PassAs<DrawQuad>())) append_quads_data->num_missing_tiles++; } else { SkColor color = SafeOpaqueBackgroundColor(); @@ -239,7 +238,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, visible_geometry_rect, color, false); - if (quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data)) + if (quad_sink->Append(quad.PassAs<DrawQuad>())) append_quads_data->num_missing_tiles++; } @@ -307,7 +306,7 @@ void PictureLayerImpl::AppendQuads(QuadSink* quad_sink, } DCHECK(draw_quad); - quad_sink->Append(draw_quad.Pass(), append_quads_data); + quad_sink->Append(draw_quad.Pass()); if (seen_tilings.empty() || seen_tilings.back() != iter.CurrentTiling()) seen_tilings.push_back(iter.CurrentTiling()); diff --git a/cc/layers/quad_sink.h b/cc/layers/quad_sink.h index 041b655..8be2881 100644 --- a/cc/layers/quad_sink.h +++ b/cc/layers/quad_sink.h @@ -13,8 +13,6 @@ namespace cc { class DrawQuad; class SharedQuadState; -struct AppendQuadsData; - class CC_EXPORT QuadSink { public: virtual ~QuadSink() {} @@ -27,8 +25,7 @@ class CC_EXPORT QuadSink { // Returns true if the quad is added to the list, and false if the quad is // entirely culled. - virtual bool Append(scoped_ptr<DrawQuad> draw_quad, - AppendQuadsData* append_quads_data) = 0; + virtual bool Append(scoped_ptr<DrawQuad> draw_quad) = 0; }; } // namespace cc diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc index a87d692..187f603 100644 --- a/cc/layers/render_surface_impl.cc +++ b/cc/layers/render_surface_impl.cc @@ -168,7 +168,7 @@ void RenderSurfaceImpl::AppendQuads(QuadSink* quad_sink, DebugBorderDrawQuad::Create(); debug_border_quad->SetNew( shared_quad_state, quad_rect, visible_quad_rect, color, width); - quad_sink->Append(debug_border_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(debug_border_quad.PassAs<DrawQuad>()); } // TODO(shawnsingh): By using the same RenderSurfaceImpl for both the content @@ -229,7 +229,7 @@ void RenderSurfaceImpl::AppendQuads(QuadSink* quad_sink, mask_uv_rect, owning_layer_->filters(), owning_layer_->background_filters()); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } } // namespace cc diff --git a/cc/layers/solid_color_layer_impl.cc b/cc/layers/solid_color_layer_impl.cc index b5514e7..19575e3 100644 --- a/cc/layers/solid_color_layer_impl.cc +++ b/cc/layers/solid_color_layer_impl.cc @@ -45,7 +45,7 @@ void SolidColorLayerImpl::AppendQuads(QuadSink* quad_sink, visible_quad_rect, background_color(), false); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } } } diff --git a/cc/layers/solid_color_scrollbar_layer_impl.cc b/cc/layers/solid_color_scrollbar_layer_impl.cc index 027e122..692f693 100644 --- a/cc/layers/solid_color_scrollbar_layer_impl.cc +++ b/cc/layers/solid_color_scrollbar_layer_impl.cc @@ -101,7 +101,7 @@ void SolidColorScrollbarLayerImpl::AppendQuads(QuadSink* quad_sink, scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); quad->SetNew( shared_quad_state, thumb_quad_rect, visible_quad_rect, color_, false); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } } // namespace cc diff --git a/cc/layers/surface_layer_impl.cc b/cc/layers/surface_layer_impl.cc index 1d7f735..b1739c3 100644 --- a/cc/layers/surface_layer_impl.cc +++ b/cc/layers/surface_layer_impl.cc @@ -48,7 +48,7 @@ void SurfaceLayerImpl::AppendQuads(QuadSink* quad_sink, gfx::Rect quad_rect(content_bounds()); gfx::Rect visible_quad_rect(quad_rect); quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, surface_id_); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color, diff --git a/cc/layers/texture_layer_impl.cc b/cc/layers/texture_layer_impl.cc index 5deb73a..bba5f2d 100644 --- a/cc/layers/texture_layer_impl.cc +++ b/cc/layers/texture_layer_impl.cc @@ -187,7 +187,7 @@ void TextureLayerImpl::AppendQuads(QuadSink* quad_sink, bg_color, vertex_opacity_, flipped_); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } void TextureLayerImpl::DidDraw(ResourceProvider* resource_provider) { diff --git a/cc/layers/tiled_layer_impl.cc b/cc/layers/tiled_layer_impl.cc index cc58112..da23e52 100644 --- a/cc/layers/tiled_layer_impl.cc +++ b/cc/layers/tiled_layer_impl.cc @@ -188,8 +188,7 @@ void TiledLayerImpl::AppendQuads(QuadSink* quad_sink, visible_tile_rect, border_color, border_width); - quad_sink->Append(debug_border_quad.PassAs<DrawQuad>(), - append_quads_data); + quad_sink->Append(debug_border_quad.PassAs<DrawQuad>()); } } } @@ -223,8 +222,7 @@ void TiledLayerImpl::AppendQuads(QuadSink* quad_sink, CheckerboardDrawQuad::Create(); checkerboard_quad->SetNew( shared_quad_state, tile_rect, visible_tile_rect, checker_color); - if (quad_sink->Append(checkerboard_quad.PassAs<DrawQuad>(), - append_quads_data)) + if (quad_sink->Append(checkerboard_quad.PassAs<DrawQuad>())) append_quads_data->num_missing_tiles++; continue; @@ -254,7 +252,7 @@ void TiledLayerImpl::AppendQuads(QuadSink* quad_sink, tex_coord_rect, texture_size, tile->contents_swizzled()); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } } } diff --git a/cc/layers/ui_resource_layer_impl.cc b/cc/layers/ui_resource_layer_impl.cc index 65b930c..8b8f97d 100644 --- a/cc/layers/ui_resource_layer_impl.cc +++ b/cc/layers/ui_resource_layer_impl.cc @@ -129,7 +129,7 @@ void UIResourceLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, vertex_opacity_, flipped); - quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(quad.PassAs<DrawQuad>()); } const char* UIResourceLayerImpl::LayerTypeAsString() const { diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc index 20c8c44..9fea5fd 100644 --- a/cc/layers/video_layer_impl.cc +++ b/cc/layers/video_layer_impl.cc @@ -168,7 +168,7 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, opacity, flipped); - quad_sink->Append(texture_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(texture_quad.PassAs<DrawQuad>()); break; } case VideoFrameExternalResources::YUV_RESOURCE: { @@ -187,7 +187,7 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, frame_resources_[1], frame_resources_[2], frame_resources_.size() > 3 ? frame_resources_[3] : 0); - quad_sink->Append(yuv_video_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(yuv_video_quad.PassAs<DrawQuad>()); break; } case VideoFrameExternalResources::RGB_RESOURCE: { @@ -211,7 +211,7 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, SK_ColorTRANSPARENT, opacity, flipped); - quad_sink->Append(texture_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(texture_quad.PassAs<DrawQuad>()); break; } case VideoFrameExternalResources::STREAM_TEXTURE_RESOURCE: { @@ -229,8 +229,7 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, visible_quad_rect, frame_resources_[0], scale * provider_client_impl_->stream_texture_matrix()); - quad_sink->Append(stream_video_quad.PassAs<DrawQuad>(), - append_quads_data); + quad_sink->Append(stream_video_quad.PassAs<DrawQuad>()); break; } case VideoFrameExternalResources::IO_SURFACE: { @@ -247,8 +246,7 @@ void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, visible_size, frame_resources_[0], IOSurfaceDrawQuad::UNFLIPPED); - quad_sink->Append(io_surface_quad.PassAs<DrawQuad>(), - append_quads_data); + quad_sink->Append(io_surface_quad.PassAs<DrawQuad>()); break; } #if defined(VIDEO_HOLE) diff --git a/cc/surfaces/surface_aggregator_test_helpers.cc b/cc/surfaces/surface_aggregator_test_helpers.cc index d484d7e..2ac3289 100644 --- a/cc/surfaces/surface_aggregator_test_helpers.cc +++ b/cc/surfaces/surface_aggregator_test_helpers.cc @@ -55,7 +55,6 @@ void AddTestSurfaceQuad(TestRenderPass* pass, void AddTestRenderPassQuad(TestRenderPass* pass, RenderPass::Id render_pass_id) { MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); - AppendQuadsData data(pass->id); gfx::Rect output_rect = gfx::Rect(0, 0, 5, 5); SharedQuadState* shared_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); @@ -77,7 +76,7 @@ void AddTestRenderPassQuad(TestRenderPass* pass, gfx::RectF(), FilterOperations(), FilterOperations()); - quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(quad.PassAs<DrawQuad>()); } void AddQuadInPass(TestRenderPass* pass, Quad desc) { diff --git a/cc/test/mock_quad_culler.cc b/cc/test/mock_quad_culler.cc index f9924c8..7bf70b7 100644 --- a/cc/test/mock_quad_culler.cc +++ b/cc/test/mock_quad_culler.cc @@ -20,7 +20,7 @@ MockQuadCuller::MockQuadCuller( MockQuadCuller::~MockQuadCuller() {} -bool MockQuadCuller::Append(scoped_ptr<DrawQuad> draw_quad, AppendQuadsData*) { +bool MockQuadCuller::Append(scoped_ptr<DrawQuad> draw_quad) { if (!draw_quad->rect.IsEmpty()) { active_quad_list_->push_back(draw_quad.Pass()); return true; diff --git a/cc/test/mock_quad_culler.h b/cc/test/mock_quad_culler.h index 4b9ef1e..238f187 100644 --- a/cc/test/mock_quad_culler.h +++ b/cc/test/mock_quad_culler.h @@ -21,8 +21,7 @@ class MockQuadCuller : public QuadSink { SharedQuadStateList* external_shared_quad_state_list); // QuadSink interface. - virtual bool Append(scoped_ptr<DrawQuad> draw_quad, - AppendQuadsData* append_quads_data) OVERRIDE; + virtual bool Append(scoped_ptr<DrawQuad> draw_quad) OVERRIDE; virtual SharedQuadState* UseSharedQuadState( scoped_ptr<SharedQuadState> shared_quad_state) OVERRIDE; diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc index 5db6799..8d0d955 100644 --- a/cc/test/render_pass_test_utils.cc +++ b/cc/test/render_pass_test_utils.cc @@ -4,7 +4,6 @@ #include "cc/test/render_pass_test_utils.h" -#include "cc/layers/append_quads_data.h" #include "cc/layers/quad_sink.h" #include "cc/quads/render_pass_draw_quad.h" #include "cc/quads/shared_quad_state.h" @@ -33,7 +32,6 @@ SolidColorDrawQuad* AddQuad(TestRenderPass* pass, const gfx::Rect& rect, SkColor color) { MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); - AppendQuadsData data(pass->id); SharedQuadState* shared_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); shared_state->SetAll(gfx::Transform(), @@ -46,7 +44,7 @@ SolidColorDrawQuad* AddQuad(TestRenderPass* pass, scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); quad->SetNew(shared_state, rect, rect, color, false); SolidColorDrawQuad* quad_ptr = quad.get(); - quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(quad.PassAs<DrawQuad>()); return quad_ptr; } @@ -54,7 +52,6 @@ SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass, const gfx::Rect& rect, SkColor color) { MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); - AppendQuadsData data(pass->id); SharedQuadState* shared_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); shared_state->SetAll(gfx::Transform(), @@ -67,7 +64,7 @@ SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass, scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); quad->SetNew(shared_state, rect, rect, color, false); SolidColorDrawQuad* quad_ptr = quad.get(); - quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(quad.PassAs<DrawQuad>()); return quad_ptr; } @@ -76,7 +73,6 @@ SolidColorDrawQuad* AddTransformedQuad(TestRenderPass* pass, SkColor color, const gfx::Transform& transform) { MockQuadCuller quad_sink(&pass->quad_list, &pass->shared_quad_state_list); - AppendQuadsData data(pass->id); SharedQuadState* shared_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); shared_state->SetAll( @@ -84,7 +80,7 @@ SolidColorDrawQuad* AddTransformedQuad(TestRenderPass* pass, scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); quad->SetNew(shared_state, rect, rect, color, false); SolidColorDrawQuad* quad_ptr = quad.get(); - quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(quad.PassAs<DrawQuad>()); return quad_ptr; } @@ -92,7 +88,6 @@ void AddRenderPassQuad(TestRenderPass* to_pass, TestRenderPass* contributing_pass) { MockQuadCuller quad_sink(&to_pass->quad_list, &to_pass->shared_quad_state_list); - AppendQuadsData data(to_pass->id); gfx::Rect output_rect = contributing_pass->output_rect; SharedQuadState* shared_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); @@ -114,7 +109,7 @@ void AddRenderPassQuad(TestRenderPass* to_pass, gfx::RectF(), FilterOperations(), FilterOperations()); - quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(quad.PassAs<DrawQuad>()); } void AddRenderPassQuad(TestRenderPass* to_pass, @@ -124,7 +119,6 @@ void AddRenderPassQuad(TestRenderPass* to_pass, gfx::Transform transform) { MockQuadCuller quad_sink(&to_pass->quad_list, &to_pass->shared_quad_state_list); - AppendQuadsData data(to_pass->id); gfx::Rect output_rect = contributing_pass->output_rect; SharedQuadState* shared_state = quad_sink.UseSharedQuadState(SharedQuadState::Create()); @@ -146,7 +140,7 @@ void AddRenderPassQuad(TestRenderPass* to_pass, gfx::RectF(), filters, FilterOperations()); - quad_sink.Append(quad.PassAs<DrawQuad>(), &data); + quad_sink.Append(quad.PassAs<DrawQuad>()); } } // namespace cc diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index d4c48f9..91aefdd 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -653,7 +653,6 @@ static void AppendQuadsToFillScreen( opacity, SkXfermode::kSrcOver_Mode); - AppendQuadsData append_quads_data; for (Region::Iterator fill_rects(screen_background_color_region); fill_rects.has_rect(); fill_rects.next()) { @@ -667,7 +666,7 @@ static void AppendQuadsToFillScreen( visible_screen_space_rect, screen_background_color, false); - quad_culler.Append(quad.PassAs<DrawQuad>(), &append_quads_data); + quad_culler.Append(quad.PassAs<DrawQuad>()); } for (Region::Iterator fill_rects(overhang_region); fill_rects.has_rect(); @@ -695,7 +694,7 @@ static void AppendQuadsToFillScreen( screen_background_color, vertex_opacity, false); - quad_culler.Append(tex_quad.PassAs<DrawQuad>(), &append_quads_data); + quad_culler.Append(tex_quad.PassAs<DrawQuad>()); } } diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index f47b3d7..a652c94 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -3186,8 +3186,7 @@ class BlendStateCheckLayer : public LayerImpl { test_blending_draw_quad->visible_rect = quad_visible_rect_; EXPECT_EQ(blend_, test_blending_draw_quad->ShouldDrawWithBlending()); EXPECT_EQ(has_render_surface_, !!render_surface()); - quad_sink->Append(test_blending_draw_quad.PassAs<DrawQuad>(), - append_quads_data); + quad_sink->Append(test_blending_draw_quad.PassAs<DrawQuad>()); } void SetExpectation(bool blend, bool has_render_surface) { @@ -3961,7 +3960,7 @@ class FakeLayerWithQuads : public LayerImpl { scoped_ptr<SolidColorDrawQuad> my_quad = SolidColorDrawQuad::Create(); my_quad->SetNew( shared_quad_state, quad_rect, visible_quad_rect, gray, false); - quad_sink->Append(my_quad.PassAs<DrawQuad>(), append_quads_data); + quad_sink->Append(my_quad.PassAs<DrawQuad>()); } private: diff --git a/cc/trees/quad_culler.cc b/cc/trees/quad_culler.cc index bbbca9e..bfd99d3 100644 --- a/cc/trees/quad_culler.cc +++ b/cc/trees/quad_culler.cc @@ -80,8 +80,7 @@ static inline bool AppendQuadInternal( return keep_quad; } -bool QuadCuller::Append(scoped_ptr<DrawQuad> draw_quad, - AppendQuadsData* append_quads_data) { +bool QuadCuller::Append(scoped_ptr<DrawQuad> draw_quad) { DCHECK(draw_quad->shared_quad_state == current_shared_quad_state_); DCHECK(!shared_quad_state_list_->empty()); DCHECK(shared_quad_state_list_->back() == current_shared_quad_state_); diff --git a/cc/trees/quad_culler.h b/cc/trees/quad_culler.h index 3d71543..7fdf5e8 100644 --- a/cc/trees/quad_culler.h +++ b/cc/trees/quad_culler.h @@ -28,8 +28,7 @@ class CC_EXPORT QuadCuller : public QuadSink { // QuadSink implementation. virtual SharedQuadState* UseSharedQuadState( scoped_ptr<SharedQuadState> shared_quad_state) OVERRIDE; - virtual bool Append(scoped_ptr<DrawQuad> draw_quad, - AppendQuadsData* append_quads_data) OVERRIDE; + virtual bool Append(scoped_ptr<DrawQuad> draw_quad) OVERRIDE; private: QuadList* quad_list_; diff --git a/cc/trees/quad_culler_unittest.cc b/cc/trees/quad_culler_unittest.cc index c716955..d7cd99ab 100644 --- a/cc/trees/quad_culler_unittest.cc +++ b/cc/trees/quad_culler_unittest.cc @@ -839,10 +839,9 @@ TEST_F(QuadCullerTest, PartialCullingNotDestroyed) { EXPECT_EQ(0u, quad_list.size()); - AppendQuadsData data; - culler.Append(color_quad.PassAs<DrawQuad>(), &data); - culler.Append(pass_quad.PassAs<DrawQuad>(), &data); - culler.Append(replica_quad.PassAs<DrawQuad>(), &data); + culler.Append(color_quad.PassAs<DrawQuad>()); + culler.Append(pass_quad.PassAs<DrawQuad>()); + culler.Append(replica_quad.PassAs<DrawQuad>()); ASSERT_EQ(3u, quad_list.size()); @@ -919,10 +918,9 @@ TEST_F(QuadCullerTest, PartialCullingWithOcclusionNotDestroyed) { EXPECT_EQ(0u, quad_list.size()); - AppendQuadsData data; - culler.Append(color_quad.PassAs<DrawQuad>(), &data); - culler.Append(pass_quad.PassAs<DrawQuad>(), &data); - culler.Append(replica_quad.PassAs<DrawQuad>(), &data); + culler.Append(color_quad.PassAs<DrawQuad>()); + culler.Append(pass_quad.PassAs<DrawQuad>()); + culler.Append(replica_quad.PassAs<DrawQuad>()); ASSERT_EQ(3u, quad_list.size()); |