diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 11:42:39 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 11:42:39 +0000 |
commit | 2a58e14322fb357f248528b4b4c77e10fa53ae2d (patch) | |
tree | 890aa3b6fe2416ca4c49786b3976f784332cea3b /cc | |
parent | e15ed2be6d44ab35e80ab71ec1d9e5eb459435eb (diff) | |
download | chromium_src-2a58e14322fb357f248528b4b4c77e10fa53ae2d.zip chromium_src-2a58e14322fb357f248528b4b4c77e10fa53ae2d.tar.gz chromium_src-2a58e14322fb357f248528b4b4c77e10fa53ae2d.tar.bz2 |
Revert of [#7] Pass gfx structs by const ref (gfx::Size) (https://codereview.chromium.org/145313006/)
Reason for revert:
Suspected of breaking the Linux ASAN tests ( http://build.chromium.org/p/chromium.memory/builders/Linux%20ASAN%20Tests%20%283%29/builds/22104 )
Original issue's description:
> [#7] Pass gfx::Size by const ref.
>
> Any struct of size > 4 bytes should be passed by const ref.
> Passing by ref for these structs is faster than passing by value,
> especially when invoking function has multiple parameters and some
> other scenarios mentioned in the bug.
>
> BUG=159273
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247426
TBR=danakj@chromium.org,enne@chromium.org,bulach@chromium.org,piman@chromium.org,prashant.n@samsung.com
NOTREECHECKS=true
NOTRY=true
BUG=159273
Review URL: https://codereview.chromium.org/142863008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
130 files changed, 297 insertions, 309 deletions
diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc index 72b1e7f..8abfa90f0 100644 --- a/cc/base/math_util.cc +++ b/cc/base/math_util.cc @@ -508,7 +508,7 @@ gfx::Vector2dF MathUtil::ProjectVector(const gfx::Vector2dF& source, projected_length * destination.y()); } -scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Size& s) { +scoped_ptr<base::Value> MathUtil::AsValue(gfx::Size s) { scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue()); res->SetDouble("width", s.width()); res->SetDouble("height", s.height()); diff --git a/cc/base/math_util.h b/cc/base/math_util.h index fca08ef..6cad1ad 100644 --- a/cc/base/math_util.h +++ b/cc/base/math_util.h @@ -165,7 +165,7 @@ class CC_EXPORT MathUtil { const gfx::Vector2dF& destination); // Conversion to value. - static scoped_ptr<base::Value> AsValue(const gfx::Size& s); + static scoped_ptr<base::Value> AsValue(gfx::Size s); static scoped_ptr<base::Value> AsValue(const gfx::SizeF& s); static scoped_ptr<base::Value> AsValue(const gfx::Rect& r); static bool FromValue(const base::Value*, gfx::Rect* out_rect); diff --git a/cc/base/tiling_data.cc b/cc/base/tiling_data.cc index 8b3ba62..9cdf027 100644 --- a/cc/base/tiling_data.cc +++ b/cc/base/tiling_data.cc @@ -29,8 +29,8 @@ TilingData::TilingData() } TilingData::TilingData( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels) : max_texture_size_(max_texture_size), total_size_(total_size), @@ -39,8 +39,8 @@ TilingData::TilingData( } TilingData::TilingData( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, int border_texels) : max_texture_size_(max_texture_size), total_size_(total_size), @@ -48,12 +48,12 @@ TilingData::TilingData( RecomputeNumTiles(); } -void TilingData::SetTotalSize(const gfx::Size& total_size) { +void TilingData::SetTotalSize(gfx::Size total_size) { total_size_ = total_size; RecomputeNumTiles(); } -void TilingData::SetMaxTextureSize(const gfx::Size& max_texture_size) { +void TilingData::SetMaxTextureSize(gfx::Size max_texture_size) { max_texture_size_ = max_texture_size; RecomputeNumTiles(); } diff --git a/cc/base/tiling_data.h b/cc/base/tiling_data.h index 9540c38..96e6ae0 100644 --- a/cc/base/tiling_data.h +++ b/cc/base/tiling_data.h @@ -23,19 +23,19 @@ class CC_EXPORT TilingData { public: TilingData(); TilingData( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels); TilingData( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, int border_texels); gfx::Size total_size() const { return total_size_; } - void SetTotalSize(const gfx::Size& total_size); + void SetTotalSize(const gfx::Size total_size); gfx::Size max_texture_size() const { return max_texture_size_; } - void SetMaxTextureSize(const gfx::Size& max_texture_size); + void SetMaxTextureSize(gfx::Size max_texture_size); int border_texels() const { return border_texels_; } void SetHasBorderTexels(bool has_border_texels); diff --git a/cc/base/tiling_data_unittest.cc b/cc/base/tiling_data_unittest.cc index 55b3b6d..db2d6f2 100644 --- a/cc/base/tiling_data_unittest.cc +++ b/cc/base/tiling_data_unittest.cc @@ -13,8 +13,8 @@ namespace cc { namespace { int NumTiles( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels) { TilingData tiling(max_texture_size, total_size, has_border_texels); int num_tiles = tiling.num_tiles_x() * tiling.num_tiles_y(); @@ -28,8 +28,8 @@ int NumTiles( } int XIndex( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int x_coord) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -37,8 +37,8 @@ int XIndex( } int YIndex( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int y_coord) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -46,8 +46,8 @@ int YIndex( } int MinBorderXIndex( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int x_coord) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -55,8 +55,8 @@ int MinBorderXIndex( } int MinBorderYIndex( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int y_coord) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -64,8 +64,8 @@ int MinBorderYIndex( } int MaxBorderXIndex( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int x_coord) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -73,8 +73,8 @@ int MaxBorderXIndex( } int MaxBorderYIndex( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int y_coord) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -82,8 +82,8 @@ int MaxBorderYIndex( } int PosX( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int x_index) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -91,8 +91,8 @@ int PosX( } int PosY( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int y_index) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -100,8 +100,8 @@ int PosY( } int SizeX( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int x_index) { TilingData tiling(max_texture_size, total_size, has_border_texels); @@ -109,8 +109,8 @@ int SizeX( } int SizeY( - const gfx::Size& max_texture_size, - const gfx::Size& total_size, + gfx::Size max_texture_size, + gfx::Size total_size, bool has_border_texels, int y_index) { TilingData tiling(max_texture_size, total_size, has_border_texels); diff --git a/cc/layers/delegated_renderer_layer.cc b/cc/layers/delegated_renderer_layer.cc index aaee787..6616b9b 100644 --- a/cc/layers/delegated_renderer_layer.cc +++ b/cc/layers/delegated_renderer_layer.cc @@ -86,7 +86,7 @@ void DelegatedRendererLayer::ProviderHasNewFrame() { SetNextCommitWaitsForActivation(); } -void DelegatedRendererLayer::SetDisplaySize(const gfx::Size& size) { +void DelegatedRendererLayer::SetDisplaySize(gfx::Size size) { if (display_size_ == size) return; display_size_ = size; diff --git a/cc/layers/delegated_renderer_layer.h b/cc/layers/delegated_renderer_layer.h index a0b67df..dc9dfee 100644 --- a/cc/layers/delegated_renderer_layer.h +++ b/cc/layers/delegated_renderer_layer.h @@ -33,7 +33,7 @@ class CC_EXPORT DelegatedRendererLayer : public Layer { // layer's origin. This must always contain at least the layer's bounds. A // value of (0, 0) implies that the frame should be displayed to fit exactly // in the layer's bounds. - void SetDisplaySize(const gfx::Size& size); + void SetDisplaySize(gfx::Size size); // Called by the DelegatedFrameProvider when a new frame is available to be // picked up. diff --git a/cc/layers/delegated_renderer_layer_impl.cc b/cc/layers/delegated_renderer_layer_impl.cc index 418e02b..e4de653 100644 --- a/cc/layers/delegated_renderer_layer_impl.cc +++ b/cc/layers/delegated_renderer_layer_impl.cc @@ -155,7 +155,7 @@ void DelegatedRendererLayerImpl::SetFrameData( have_render_passes_to_push_ = true; } -void DelegatedRendererLayerImpl::SetDisplaySize(const gfx::Size& size) { +void DelegatedRendererLayerImpl::SetDisplaySize(gfx::Size size) { if (display_size_ == size) return; display_size_ = size; @@ -197,7 +197,7 @@ void DelegatedRendererLayerImpl::ReleaseResources() { } gfx::Transform DelegatedRendererLayerImpl::DelegatedFrameToLayerSpaceTransform( - const gfx::Size& frame_size) const { + gfx::Size frame_size) const { gfx::Size display_size = display_size_.IsEmpty() ? bounds() : display_size_; gfx::Transform delegated_frame_to_layer_space_transform; @@ -394,7 +394,7 @@ void DelegatedRendererLayerImpl::AppendRenderPassQuads( QuadSink* quad_sink, AppendQuadsData* append_quads_data, const RenderPass* delegated_render_pass, - const gfx::Size& frame_size) const { + gfx::Size frame_size) const { const SharedQuadState* delegated_shared_quad_state = NULL; SharedQuadState* output_shared_quad_state = NULL; diff --git a/cc/layers/delegated_renderer_layer_impl.h b/cc/layers/delegated_renderer_layer_impl.h index e71fce8..a82a1f7 100644 --- a/cc/layers/delegated_renderer_layer_impl.h +++ b/cc/layers/delegated_renderer_layer_impl.h @@ -48,7 +48,7 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { void SetFrameData(const DelegatedFrameData* frame_data, const gfx::RectF& damage_in_frame); - void SetDisplaySize(const gfx::Size& size); + void SetDisplaySize(gfx::Size size); protected: DelegatedRendererLayerImpl(LayerTreeImpl* tree_impl, int id); @@ -77,14 +77,14 @@ class CC_EXPORT DelegatedRendererLayerImpl : public LayerImpl { RenderPass::Id delegated_render_pass_id, RenderPass::Id* output_render_pass_id) const; - gfx::Transform DelegatedFrameToLayerSpaceTransform( - const gfx::Size& frame_size) const; + gfx::Transform DelegatedFrameToLayerSpaceTransform(gfx::Size frame_size) + const; void AppendRenderPassQuads( QuadSink* quad_sink, AppendQuadsData* append_quads_data, const RenderPass* delegated_render_pass, - const gfx::Size& frame_size) const; + gfx::Size frame_size) const; // LayerImpl overrides. virtual const char* LayerTypeAsString() const OVERRIDE; diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc index ca63471..92486cc 100644 --- a/cc/layers/heads_up_display_layer.cc +++ b/cc/layers/heads_up_display_layer.cc @@ -21,7 +21,7 @@ HeadsUpDisplayLayer::HeadsUpDisplayLayer() {} HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {} void HeadsUpDisplayLayer::PrepareForCalculateDrawProperties( - const gfx::Size& device_viewport, float device_scale_factor) { + gfx::Size device_viewport, float device_scale_factor) { gfx::Size device_viewport_in_layout_pixels = gfx::Size( device_viewport.width() / device_scale_factor, device_viewport.height() / device_scale_factor); diff --git a/cc/layers/heads_up_display_layer.h b/cc/layers/heads_up_display_layer.h index 4750faf..9116429 100644 --- a/cc/layers/heads_up_display_layer.h +++ b/cc/layers/heads_up_display_layer.h @@ -18,7 +18,7 @@ class CC_EXPORT HeadsUpDisplayLayer : public ContentsScalingLayer { static scoped_refptr<HeadsUpDisplayLayer> Create(); void PrepareForCalculateDrawProperties( - const gfx::Size& device_viewport, float device_scale_factor); + gfx::Size device_viewport, float device_scale_factor); virtual bool DrawsContent() const OVERRIDE; diff --git a/cc/layers/io_surface_layer.cc b/cc/layers/io_surface_layer.cc index 209827d..1e94515 100644 --- a/cc/layers/io_surface_layer.cc +++ b/cc/layers/io_surface_layer.cc @@ -17,7 +17,7 @@ IOSurfaceLayer::IOSurfaceLayer() : Layer(), io_surface_id_(0) {} IOSurfaceLayer::~IOSurfaceLayer() {} void IOSurfaceLayer::SetIOSurfaceProperties(uint32_t io_surface_id, - const gfx::Size& size) { + gfx::Size size) { io_surface_id_ = io_surface_id; io_surface_size_ = size; SetNeedsCommit(); diff --git a/cc/layers/io_surface_layer.h b/cc/layers/io_surface_layer.h index 9939f56..e2e831a 100644 --- a/cc/layers/io_surface_layer.h +++ b/cc/layers/io_surface_layer.h @@ -14,7 +14,7 @@ class CC_EXPORT IOSurfaceLayer : public Layer { public: static scoped_refptr<IOSurfaceLayer> Create(); - void SetIOSurfaceProperties(uint32_t io_surface_id, const gfx::Size& size); + void SetIOSurfaceProperties(uint32_t io_surface_id, gfx::Size size); virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) OVERRIDE; diff --git a/cc/layers/io_surface_layer_impl.cc b/cc/layers/io_surface_layer_impl.cc index b8d6919..d2c5438 100644 --- a/cc/layers/io_surface_layer_impl.cc +++ b/cc/layers/io_surface_layer_impl.cc @@ -131,7 +131,7 @@ void IOSurfaceLayerImpl::ReleaseResources() { } void IOSurfaceLayerImpl::SetIOSurfaceProperties(unsigned io_surface_id, - const gfx::Size& size) { + gfx::Size size) { if (io_surface_id_ != io_surface_id) io_surface_changed_ = true; diff --git a/cc/layers/io_surface_layer_impl.h b/cc/layers/io_surface_layer_impl.h index efd7428..5c096bb 100644 --- a/cc/layers/io_surface_layer_impl.h +++ b/cc/layers/io_surface_layer_impl.h @@ -21,7 +21,7 @@ class CC_EXPORT IOSurfaceLayerImpl : public LayerImpl { } virtual ~IOSurfaceLayerImpl(); - void SetIOSurfaceProperties(unsigned io_surface_id, const gfx::Size& size); + void SetIOSurfaceProperties(unsigned io_surface_id, gfx::Size size); virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) OVERRIDE; diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index 79f00f1..f585006 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc @@ -324,7 +324,7 @@ int Layer::IndexOfChild(const Layer* reference) { return -1; } -void Layer::SetBounds(const gfx::Size& size) { +void Layer::SetBounds(gfx::Size size) { DCHECK(IsPropertyChangeAllowed()); if (bounds() == size) return; diff --git a/cc/layers/layer.h b/cc/layers/layer.h index 6b7eafc..df358f2 100644 --- a/cc/layers/layer.h +++ b/cc/layers/layer.h @@ -116,7 +116,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>, // A layer's bounds are in logical, non-page-scaled pixels (however, the // root layer's bounds are in physical pixels). - void SetBounds(const gfx::Size& bounds); + void SetBounds(gfx::Size bounds); gfx::Size bounds() const { return bounds_; } void SetMasksToBounds(bool masks_to_bounds); diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc index 42338e0..beb282d 100644 --- a/cc/layers/layer_impl.cc +++ b/cc/layers/layer_impl.cc @@ -751,7 +751,7 @@ bool LayerImpl::IsActive() const { return layer_tree_impl_->IsActiveTree(); } -void LayerImpl::SetBounds(const gfx::Size& bounds) { +void LayerImpl::SetBounds(gfx::Size bounds) { if (bounds_ == bounds) return; @@ -996,7 +996,7 @@ void LayerImpl::SetUpdateRect(const gfx::RectF& update_rect) { SetNeedsPushProperties(); } -void LayerImpl::SetContentBounds(const gfx::Size& content_bounds) { +void LayerImpl::SetContentBounds(gfx::Size content_bounds) { if (this->content_bounds() == content_bounds) return; diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index e1dfb7e..66fa84b 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h @@ -340,10 +340,10 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver, // contents scale to appropriate values. LayerImpl doesn't calculate any of // them from the other values. - void SetBounds(const gfx::Size& bounds); + void SetBounds(gfx::Size bounds); gfx::Size bounds() const { return bounds_; } - void SetContentBounds(const gfx::Size& content_bounds); + void SetContentBounds(gfx::Size content_bounds); gfx::Size content_bounds() const { return draw_properties_.content_bounds; } float contents_scale_x() const { return draw_properties_.contents_scale_x; } diff --git a/cc/layers/layer_position_constraint_unittest.cc b/cc/layers/layer_position_constraint_unittest.cc index efa81e2e..57e4c1d 100644 --- a/cc/layers/layer_position_constraint_unittest.cc +++ b/cc/layers/layer_position_constraint_unittest.cc @@ -21,7 +21,7 @@ void SetLayerPropertiesForTesting(LayerImpl* layer, const gfx::Transform& sublayer_transform, const gfx::PointF& anchor, const gfx::PointF& position, - const gfx::Size& bounds, + gfx::Size bounds, bool preserves3d) { layer->SetTransform(transform); layer->SetSublayerTransform(sublayer_transform); diff --git a/cc/layers/nine_patch_layer_impl_unittest.cc b/cc/layers/nine_patch_layer_impl_unittest.cc index 0755cfa..22f2c94 100644 --- a/cc/layers/nine_patch_layer_impl_unittest.cc +++ b/cc/layers/nine_patch_layer_impl_unittest.cc @@ -30,9 +30,9 @@ gfx::Rect ToRoundedIntRect(const gfx::RectF& rect_f) { gfx::ToRoundedInt(rect_f.height())); } -void NinePatchLayerLayoutTest(const gfx::Size& bitmap_size, +void NinePatchLayerLayoutTest(gfx::Size bitmap_size, const gfx::Rect& aperture_rect, - const gfx::Size& layer_size, + gfx::Size layer_size, const gfx::Rect& border, bool fill_center, size_t expected_quad_size) { diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc index 0826186f..c16b115 100644 --- a/cc/layers/picture_layer_impl.cc +++ b/cc/layers/picture_layer_impl.cc @@ -514,7 +514,7 @@ const PictureLayerTiling* PictureLayerImpl::GetTwinTiling( } gfx::Size PictureLayerImpl::CalculateTileSize( - const gfx::Size& content_bounds) const { + gfx::Size content_bounds) const { if (is_mask_) { int max_size = layer_tree_impl()->MaxTextureSize(); return gfx::Size( diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h index c335426..0491efb 100644 --- a/cc/layers/picture_layer_impl.h +++ b/cc/layers/picture_layer_impl.h @@ -58,7 +58,7 @@ class CC_EXPORT PictureLayerImpl const gfx::Rect& content_rect) OVERRIDE; virtual void UpdatePile(Tile* tile) OVERRIDE; virtual gfx::Size CalculateTileSize( - const gfx::Size& content_bounds) const OVERRIDE; + gfx::Size content_bounds) const OVERRIDE; virtual const Region* GetInvalidation() OVERRIDE; virtual const PictureLayerTiling* GetTwinTiling( const PictureLayerTiling* tiling) const OVERRIDE; diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc index c3b569d..8c6412d 100644 --- a/cc/layers/picture_layer_impl_unittest.cc +++ b/cc/layers/picture_layer_impl_unittest.cc @@ -57,7 +57,7 @@ class PictureLayerImplTest : public testing::Test { host_impl_.InitializeRenderer(CreateFakeOutputSurface()); } - void SetupDefaultTrees(const gfx::Size& layer_bounds) { + void SetupDefaultTrees(gfx::Size layer_bounds) { gfx::Size tile_size(100, 100); scoped_refptr<FakePicturePileImpl> pending_pile = @@ -76,8 +76,8 @@ class PictureLayerImplTest : public testing::Test { host_impl_.active_tree()->LayerById(id_)); } - void SetupDefaultTreesWithFixedTileSize(const gfx::Size& layer_bounds, - const gfx::Size& tile_size) { + void SetupDefaultTreesWithFixedTileSize(gfx::Size layer_bounds, + gfx::Size tile_size) { SetupDefaultTrees(layer_bounds); pending_layer_->set_fixed_tile_size(tile_size); active_layer_->set_fixed_tile_size(tile_size); diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc index bb76720..4fab625 100644 --- a/cc/layers/scrollbar_layer_unittest.cc +++ b/cc/layers/scrollbar_layer_unittest.cc @@ -453,7 +453,7 @@ class ScrollbarLayerTestMaxTextureSize : public LayerTreeTest { public: ScrollbarLayerTestMaxTextureSize() {} - void SetScrollbarBounds(const gfx::Size& bounds) { bounds_ = bounds; } + void SetScrollbarBounds(gfx::Size bounds) { bounds_ = bounds; } virtual void BeginTest() OVERRIDE { scoped_ptr<Scrollbar> scrollbar(new FakeScrollbar); diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc index 2507470..51bf212 100644 --- a/cc/layers/tiled_layer.cc +++ b/cc/layers/tiled_layer.cc @@ -158,9 +158,7 @@ void TiledLayer::UpdateBounds() { InvalidateContentRect(new_rects.rect()); } -void TiledLayer::SetTileSize(const gfx::Size& size) { - tiler_->SetTileSize(size); -} +void TiledLayer::SetTileSize(gfx::Size size) { tiler_->SetTileSize(size); } void TiledLayer::SetBorderTexelOption( LayerTilingData::BorderTexelOption border_texel_option) { diff --git a/cc/layers/tiled_layer.h b/cc/layers/tiled_layer.h index 50e2b67..f2f7e96 100644 --- a/cc/layers/tiled_layer.h +++ b/cc/layers/tiled_layer.h @@ -46,7 +46,7 @@ class CC_EXPORT TiledLayer : public ContentsScalingLayer { void UpdateBounds(); // Exposed to subclasses for testing. - void SetTileSize(const gfx::Size& size); + void SetTileSize(gfx::Size size); void SetTextureFormat(ResourceFormat texture_format) { texture_format_ = texture_format; } diff --git a/cc/layers/tiled_layer_impl_unittest.cc b/cc/layers/tiled_layer_impl_unittest.cc index 948ab37..377b04d 100644 --- a/cc/layers/tiled_layer_impl_unittest.cc +++ b/cc/layers/tiled_layer_impl_unittest.cc @@ -23,8 +23,8 @@ class TiledLayerImplTest : public testing::Test { TiledLayerImplTest() : host_impl_(&proxy_) {} scoped_ptr<TiledLayerImpl> CreateLayerNoTiles( - const gfx::Size& tile_size, - const gfx::Size& layer_size, + gfx::Size tile_size, + gfx::Size layer_size, LayerTilingData::BorderTexelOption border_texels) { scoped_ptr<TiledLayerImpl> layer = TiledLayerImpl::Create(host_impl_.active_tree(), 1); @@ -46,8 +46,8 @@ class TiledLayerImplTest : public testing::Test { // Create a default tiled layer with textures for all tiles and a default // visibility of the entire layer size. scoped_ptr<TiledLayerImpl> CreateLayer( - const gfx::Size& tile_size, - const gfx::Size& layer_size, + gfx::Size tile_size, + gfx::Size layer_size, LayerTilingData::BorderTexelOption border_texels) { scoped_ptr<TiledLayerImpl> layer = CreateLayerNoTiles(tile_size, layer_size, border_texels); @@ -69,8 +69,8 @@ class TiledLayerImplTest : public testing::Test { void GetQuads(QuadList* quads, SharedQuadStateList* shared_states, - const gfx::Size& tile_size, - const gfx::Size& layer_size, + gfx::Size tile_size, + gfx::Size layer_size, LayerTilingData::BorderTexelOption border_texel_option, const gfx::Rect& visible_content_rect) { scoped_ptr<TiledLayerImpl> layer = diff --git a/cc/layers/ui_resource_layer_impl.cc b/cc/layers/ui_resource_layer_impl.cc index ad7fd2c..8a45eaa 100644 --- a/cc/layers/ui_resource_layer_impl.cc +++ b/cc/layers/ui_resource_layer_impl.cc @@ -49,7 +49,7 @@ void UIResourceLayerImpl::SetUIResourceId(UIResourceId uid) { NoteLayerPropertyChanged(); } -void UIResourceLayerImpl::SetImageBounds(const gfx::Size& image_bounds) { +void UIResourceLayerImpl::SetImageBounds(gfx::Size image_bounds) { // This check imposes an ordering on the call sequence. An UIResource must // exist before SetImageBounds can be called. DCHECK(ui_resource_id_); diff --git a/cc/layers/ui_resource_layer_impl.h b/cc/layers/ui_resource_layer_impl.h index c61df47..b8b06d9 100644 --- a/cc/layers/ui_resource_layer_impl.h +++ b/cc/layers/ui_resource_layer_impl.h @@ -30,7 +30,7 @@ class CC_EXPORT UIResourceLayerImpl : public LayerImpl { void SetUIResourceId(UIResourceId uid); - void SetImageBounds(const gfx::Size& image_bounds); + void SetImageBounds(gfx::Size image_bounds); // Sets a UV transform to be used at draw time. Defaults to (0, 0) and (1, 1). void SetUV(const gfx::PointF& top_left, const gfx::PointF& bottom_right); diff --git a/cc/layers/ui_resource_layer_impl_unittest.cc b/cc/layers/ui_resource_layer_impl_unittest.cc index 596cb3b..4c55f1d 100644 --- a/cc/layers/ui_resource_layer_impl_unittest.cc +++ b/cc/layers/ui_resource_layer_impl_unittest.cc @@ -21,8 +21,8 @@ namespace { scoped_ptr<UIResourceLayerImpl> GenerateUIResourceLayer( FakeUIResourceLayerTreeHostImpl* host_impl, - const gfx::Size& bitmap_size, - const gfx::Size& layer_size, + gfx::Size bitmap_size, + gfx::Size layer_size, bool opaque, UIResourceId uid) { gfx::Rect visible_content_rect(layer_size); diff --git a/cc/output/copy_output_request.cc b/cc/output/copy_output_request.cc index 56dac2a..50173d5 100644 --- a/cc/output/copy_output_request.cc +++ b/cc/output/copy_output_request.cc @@ -55,7 +55,7 @@ void CopyOutputRequest::SendBitmapResult(scoped_ptr<SkBitmap> bitmap) { } void CopyOutputRequest::SendTextureResult( - const gfx::Size& size, + gfx::Size size, const TextureMailbox& texture_mailbox, scoped_ptr<SingleReleaseCallback> release_callback) { DCHECK(texture_mailbox.IsTexture()); diff --git a/cc/output/copy_output_request.h b/cc/output/copy_output_request.h index dcb2fe2..6d8870d 100644 --- a/cc/output/copy_output_request.h +++ b/cc/output/copy_output_request.h @@ -62,7 +62,7 @@ class CC_EXPORT CopyOutputRequest { void SendEmptyResult(); void SendBitmapResult(scoped_ptr<SkBitmap> bitmap); - void SendTextureResult(const gfx::Size& size, + void SendTextureResult(gfx::Size size, const TextureMailbox& texture_mailbox, scoped_ptr<SingleReleaseCallback> release_callback); diff --git a/cc/output/copy_output_result.cc b/cc/output/copy_output_result.cc index adbb8de..1831fba 100644 --- a/cc/output/copy_output_result.cc +++ b/cc/output/copy_output_result.cc @@ -20,7 +20,7 @@ CopyOutputResult::CopyOutputResult(scoped_ptr<SkBitmap> bitmap) } CopyOutputResult::CopyOutputResult( - const gfx::Size& size, + gfx::Size size, const TextureMailbox& texture_mailbox, scoped_ptr<SingleReleaseCallback> release_callback) : size_(size), diff --git a/cc/output/copy_output_result.h b/cc/output/copy_output_result.h index b4806581..c2f011d 100644 --- a/cc/output/copy_output_result.h +++ b/cc/output/copy_output_result.h @@ -26,7 +26,7 @@ class CC_EXPORT CopyOutputResult { return make_scoped_ptr(new CopyOutputResult(bitmap.Pass())); } static scoped_ptr<CopyOutputResult> CreateTextureResult( - const gfx::Size& size, + gfx::Size size, const TextureMailbox& texture_mailbox, scoped_ptr<SingleReleaseCallback> release_callback) { return make_scoped_ptr( @@ -47,7 +47,7 @@ class CC_EXPORT CopyOutputResult { private: CopyOutputResult(); explicit CopyOutputResult(scoped_ptr<SkBitmap> bitmap); - explicit CopyOutputResult(const gfx::Size& size, + explicit CopyOutputResult(gfx::Size size, const TextureMailbox& texture_mailbox, scoped_ptr<SingleReleaseCallback> release_callback); diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc index 06e2afb..f90789d 100644 --- a/cc/output/direct_renderer.cc +++ b/cc/output/direct_renderer.cc @@ -83,7 +83,7 @@ void DirectRenderer::QuadRectTransform(gfx::Transform* quad_rect_transform, void DirectRenderer::InitializeViewport(DrawingFrame* frame, const gfx::Rect& draw_rect, const gfx::Rect& viewport_rect, - const gfx::Size& surface_size) { + gfx::Size surface_size) { bool flip_y = FlippedFramebuffer(); DCHECK_GE(viewport_rect.x(), 0); diff --git a/cc/output/direct_renderer.h b/cc/output/direct_renderer.h index 08b75a1..4a447aa 100644 --- a/cc/output/direct_renderer.h +++ b/cc/output/direct_renderer.h @@ -74,7 +74,7 @@ class CC_EXPORT DirectRenderer : public Renderer { void InitializeViewport(DrawingFrame* frame, const gfx::Rect& draw_rect, const gfx::Rect& viewport_rect, - const gfx::Size& surface_size); + gfx::Size surface_size); gfx::Rect MoveFromDrawToWindowSpace(const gfx::RectF& draw_rect) const; bool NeedDeviceClip(const DrawingFrame* frame) const; diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index f2a3b15..028c409 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc @@ -2402,7 +2402,7 @@ void GLRenderer::FinishedReadback( unsigned source_buffer, unsigned query, uint8* dest_pixels, - const gfx::Size& size) { + gfx::Size size) { DCHECK(!pending_async_read_pixels_.empty()); if (query != 0) { diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h index 82befc7..5feecd4 100644 --- a/cc/output/gl_renderer.h +++ b/cc/output/gl_renderer.h @@ -208,7 +208,7 @@ class CC_EXPORT GLRenderer : public DirectRenderer { unsigned source_buffer, unsigned query, uint8_t* dest_pixels, - const gfx::Size& size); + gfx::Size size); void PassOnSkBitmap(scoped_ptr<SkBitmap> bitmap, scoped_ptr<SkAutoLockPixels> lock, scoped_ptr<CopyOutputRequest> request, diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc index 476f7a8..f7bb3bd 100644 --- a/cc/output/gl_renderer_unittest.cc +++ b/cc/output/gl_renderer_unittest.cc @@ -1059,8 +1059,8 @@ class NonReshapableOutputSurface : public FakeOutputSurface { false) { surface_size_ = gfx::Size(500, 500); } - virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE {} - void set_fixed_size(const gfx::Size& size) { surface_size_ = size; } + virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE {} + void set_fixed_size(gfx::Size size) { surface_size_ = size; } }; TEST_F(GLRendererTest, NoDiscardOnPartialUpdates) { @@ -1674,7 +1674,7 @@ class MockOutputSurface : public OutputSurface { MOCK_METHOD0(EnsureBackbuffer, void()); MOCK_METHOD0(DiscardBackbuffer, void()); - MOCK_METHOD2(Reshape, void(const gfx::Size& size, float scale_factor)); + MOCK_METHOD2(Reshape, void(gfx::Size size, float scale_factor)); MOCK_METHOD0(BindFramebuffer, void()); MOCK_METHOD1(SwapBuffers, void(CompositorFrame* frame)); }; diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc index 9ba6dbb..f3952d5 100644 --- a/cc/output/output_surface.cc +++ b/cc/output/output_surface.cc @@ -355,7 +355,7 @@ void OutputSurface::DiscardBackbuffer() { software_device_->DiscardBackbuffer(); } -void OutputSurface::Reshape(const gfx::Size& size, float scale_factor) { +void OutputSurface::Reshape(gfx::Size size, float scale_factor) { if (size == surface_size_ && scale_factor == device_scale_factor_) return; diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h index 754707b..aae3b8c 100644 --- a/cc/output/output_surface.h +++ b/cc/output/output_surface.h @@ -114,7 +114,7 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { virtual void EnsureBackbuffer(); virtual void DiscardBackbuffer(); - virtual void Reshape(const gfx::Size& size, float scale_factor); + virtual void Reshape(gfx::Size size, float scale_factor); virtual gfx::Size SurfaceSize() const; virtual void BindFramebuffer(); diff --git a/cc/output/shader.cc b/cc/output/shader.cc index 1c7040e..b752f46 100644 --- a/cc/output/shader.cc +++ b/cc/output/shader.cc @@ -146,7 +146,7 @@ TexCoordPrecision TexCoordPrecisionRequired(GLES2Interface* context, TexCoordPrecision TexCoordPrecisionRequired(GLES2Interface* context, int *highp_threshold_cache, int highp_threshold_min, - const gfx::Size& max_size) { + gfx::Size max_size) { return TexCoordPrecisionRequired(context, highp_threshold_cache, highp_threshold_min, max_size.width(), max_size.height()); diff --git a/cc/output/shader.h b/cc/output/shader.h index 8b2a5d9..9473ce8 100644 --- a/cc/output/shader.h +++ b/cc/output/shader.h @@ -53,7 +53,7 @@ CC_EXPORT TexCoordPrecision TexCoordPrecisionRequired( gpu::gles2::GLES2Interface* context, int *highp_threshold_cache, int highp_threshold_min, - const gfx::Size& max_size); + gfx::Size max_size); class VertexShaderPosTex { public: diff --git a/cc/output/software_output_device.cc b/cc/output/software_output_device.cc index 9730f7d..3e75e06 100644 --- a/cc/output/software_output_device.cc +++ b/cc/output/software_output_device.cc @@ -17,7 +17,7 @@ SoftwareOutputDevice::SoftwareOutputDevice() {} SoftwareOutputDevice::~SoftwareOutputDevice() {} -void SoftwareOutputDevice::Resize(const gfx::Size& viewport_size) { +void SoftwareOutputDevice::Resize(gfx::Size viewport_size) { if (viewport_size_ == viewport_size) return; diff --git a/cc/output/software_output_device.h b/cc/output/software_output_device.h index 827210e..e203902 100644 --- a/cc/output/software_output_device.h +++ b/cc/output/software_output_device.h @@ -36,7 +36,7 @@ class CC_EXPORT SoftwareOutputDevice { // Discards any pre-existing backing buffers and allocates memory for a // software device of |size|. This must be called before the // |SoftwareOutputDevice| can be used in other ways. - virtual void Resize(const gfx::Size& size); + virtual void Resize(gfx::Size size); // Called on BeginDrawingFrame. The compositor will draw into the returned // SkCanvas. The |SoftwareOutputDevice| implementation needs to provide a diff --git a/cc/quads/content_draw_quad_base.cc b/cc/quads/content_draw_quad_base.cc index a802b19..ca81cf4 100644 --- a/cc/quads/content_draw_quad_base.cc +++ b/cc/quads/content_draw_quad_base.cc @@ -22,7 +22,7 @@ void ContentDrawQuadBase::SetNew(const SharedQuadState* shared_quad_state, const gfx::Rect& rect, const gfx::Rect& opaque_rect, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, bool swizzle_contents) { gfx::Rect visible_rect = rect; bool needs_blending = false; @@ -40,7 +40,7 @@ void ContentDrawQuadBase::SetAll(const SharedQuadState* shared_quad_state, const gfx::Rect& visible_rect, bool needs_blending, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, bool swizzle_contents) { DrawQuad::SetAll(shared_quad_state, material, rect, opaque_rect, visible_rect, needs_blending); diff --git a/cc/quads/content_draw_quad_base.h b/cc/quads/content_draw_quad_base.h index 44f8bd0..d07bd36 100644 --- a/cc/quads/content_draw_quad_base.h +++ b/cc/quads/content_draw_quad_base.h @@ -21,7 +21,7 @@ class CC_EXPORT ContentDrawQuadBase : public DrawQuad { const gfx::Rect& rect, const gfx::Rect& opaque_rect, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, bool swizzle_contents); void SetAll(const SharedQuadState* shared_quad_state, @@ -31,7 +31,7 @@ class CC_EXPORT ContentDrawQuadBase : public DrawQuad { const gfx::Rect& visible_rect, bool needs_blending, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, bool swizzle_contents); gfx::RectF tex_coord_rect; diff --git a/cc/quads/io_surface_draw_quad.cc b/cc/quads/io_surface_draw_quad.cc index d19b2ad..a415d06 100644 --- a/cc/quads/io_surface_draw_quad.cc +++ b/cc/quads/io_surface_draw_quad.cc @@ -22,7 +22,7 @@ scoped_ptr<IOSurfaceDrawQuad> IOSurfaceDrawQuad::Create() { void IOSurfaceDrawQuad::SetNew(const SharedQuadState* shared_quad_state, const gfx::Rect& rect, const gfx::Rect& opaque_rect, - const gfx::Size& io_surface_size, + gfx::Size io_surface_size, unsigned io_surface_resource_id, Orientation orientation) { gfx::Rect visible_rect = rect; @@ -39,7 +39,7 @@ void IOSurfaceDrawQuad::SetAll(const SharedQuadState* shared_quad_state, const gfx::Rect& opaque_rect, const gfx::Rect& visible_rect, bool needs_blending, - const gfx::Size& io_surface_size, + gfx::Size io_surface_size, unsigned io_surface_resource_id, Orientation orientation) { DrawQuad::SetAll(shared_quad_state, DrawQuad::IO_SURFACE_CONTENT, rect, diff --git a/cc/quads/io_surface_draw_quad.h b/cc/quads/io_surface_draw_quad.h index d4a58b8..c2307ce 100644 --- a/cc/quads/io_surface_draw_quad.h +++ b/cc/quads/io_surface_draw_quad.h @@ -24,7 +24,7 @@ class CC_EXPORT IOSurfaceDrawQuad : public DrawQuad { void SetNew(const SharedQuadState* shared_quad_state, const gfx::Rect& rect, const gfx::Rect& opaque_rect, - const gfx::Size& io_surface_size, + gfx::Size io_surface_size, unsigned io_surface_resource_id, Orientation orientation); @@ -33,7 +33,7 @@ class CC_EXPORT IOSurfaceDrawQuad : public DrawQuad { const gfx::Rect& opaque_rect, const gfx::Rect& visible_rect, bool needs_blending, - const gfx::Size& io_surface_size, + gfx::Size io_surface_size, unsigned io_surface_resource_id, Orientation orientation); diff --git a/cc/quads/picture_draw_quad.cc b/cc/quads/picture_draw_quad.cc index a092c8d..f51b65b 100644 --- a/cc/quads/picture_draw_quad.cc +++ b/cc/quads/picture_draw_quad.cc @@ -24,7 +24,7 @@ void PictureDrawQuad::SetNew(const SharedQuadState* shared_quad_state, const gfx::Rect& rect, const gfx::Rect& opaque_rect, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, ResourceFormat texture_format, const gfx::Rect& content_rect, float contents_scale, @@ -49,7 +49,7 @@ void PictureDrawQuad::SetAll(const SharedQuadState* shared_quad_state, const gfx::Rect& visible_rect, bool needs_blending, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, ResourceFormat texture_format, const gfx::Rect& content_rect, float contents_scale, diff --git a/cc/quads/picture_draw_quad.h b/cc/quads/picture_draw_quad.h index 76d64b0b..8f72353 100644 --- a/cc/quads/picture_draw_quad.h +++ b/cc/quads/picture_draw_quad.h @@ -26,7 +26,7 @@ class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase { const gfx::Rect& rect, const gfx::Rect& opaque_rect, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, ResourceFormat texture_format, const gfx::Rect& content_rect, float contents_scale, @@ -38,7 +38,7 @@ class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase { const gfx::Rect& visible_rect, bool needs_blending, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, ResourceFormat texture_format, const gfx::Rect& content_rect, float contents_scale, diff --git a/cc/quads/shared_quad_state.cc b/cc/quads/shared_quad_state.cc index 9ea3faa..66d0607 100644 --- a/cc/quads/shared_quad_state.cc +++ b/cc/quads/shared_quad_state.cc @@ -28,7 +28,7 @@ scoped_ptr<SharedQuadState> SharedQuadState::Copy() const { } void SharedQuadState::SetAll(const gfx::Transform& content_to_target_transform, - const gfx::Size& content_bounds, + gfx::Size content_bounds, const gfx::Rect& visible_content_rect, const gfx::Rect& clip_rect, bool is_clipped, diff --git a/cc/quads/shared_quad_state.h b/cc/quads/shared_quad_state.h index b7e1a9e..9098bfb 100644 --- a/cc/quads/shared_quad_state.h +++ b/cc/quads/shared_quad_state.h @@ -25,7 +25,7 @@ class CC_EXPORT SharedQuadState { scoped_ptr<SharedQuadState> Copy() const; void SetAll(const gfx::Transform& content_to_target_transform, - const gfx::Size& content_bounds, + gfx::Size content_bounds, const gfx::Rect& visible_content_rect, const gfx::Rect& clip_rect, bool is_clipped, diff --git a/cc/quads/tile_draw_quad.cc b/cc/quads/tile_draw_quad.cc index c17bb99..60116cc 100644 --- a/cc/quads/tile_draw_quad.cc +++ b/cc/quads/tile_draw_quad.cc @@ -26,7 +26,7 @@ void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state, const gfx::Rect& opaque_rect, unsigned resource_id, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, bool swizzle_contents) { ContentDrawQuadBase::SetNew(shared_quad_state, DrawQuad::TILED_CONTENT, rect, opaque_rect, tex_coord_rect, texture_size, @@ -41,7 +41,7 @@ void TileDrawQuad::SetAll(const SharedQuadState* shared_quad_state, bool needs_blending, unsigned resource_id, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, bool swizzle_contents) { ContentDrawQuadBase::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect, opaque_rect, visible_rect, needs_blending, diff --git a/cc/quads/tile_draw_quad.h b/cc/quads/tile_draw_quad.h index 75eb4d4..f4053c5 100644 --- a/cc/quads/tile_draw_quad.h +++ b/cc/quads/tile_draw_quad.h @@ -19,7 +19,7 @@ class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase { const gfx::Rect& opaque_rect, unsigned resource_id, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, bool swizzle_contents); void SetAll(const SharedQuadState* shared_quad_state, @@ -29,7 +29,7 @@ class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase { bool needs_blending, unsigned resource_id, const gfx::RectF& tex_coord_rect, - const gfx::Size& texture_size, + gfx::Size texture_size, bool swizzle_contents); unsigned resource_id; diff --git a/cc/resources/bitmap_content_layer_updater.cc b/cc/resources/bitmap_content_layer_updater.cc index 493b42e..312b5a5 100644 --- a/cc/resources/bitmap_content_layer_updater.cc +++ b/cc/resources/bitmap_content_layer_updater.cc @@ -55,7 +55,7 @@ scoped_ptr<LayerUpdater::Resource> BitmapContentLayerUpdater::CreateResource( void BitmapContentLayerUpdater::PrepareToUpdate( const gfx::Rect& content_rect, - const gfx::Size& tile_size, + gfx::Size tile_size, float contents_width_scale, float contents_height_scale, gfx::Rect* resulting_opaque_rect) { diff --git a/cc/resources/bitmap_content_layer_updater.h b/cc/resources/bitmap_content_layer_updater.h index 1cb49c2..d4909fa 100644 --- a/cc/resources/bitmap_content_layer_updater.h +++ b/cc/resources/bitmap_content_layer_updater.h @@ -48,7 +48,7 @@ class CC_EXPORT BitmapContentLayerUpdater : public ContentLayerUpdater { virtual scoped_ptr<LayerUpdater::Resource> CreateResource( PrioritizedResourceManager* manager) OVERRIDE; virtual void PrepareToUpdate(const gfx::Rect& content_rect, - const gfx::Size& tile_size, + gfx::Size tile_size, float contents_width_scale, float contents_height_scale, gfx::Rect* resulting_opaque_rect) OVERRIDE; diff --git a/cc/resources/layer_tiling_data.cc b/cc/resources/layer_tiling_data.cc index ccbb6d0..e9caf9b 100644 --- a/cc/resources/layer_tiling_data.cc +++ b/cc/resources/layer_tiling_data.cc @@ -10,20 +10,19 @@ namespace cc { -scoped_ptr<LayerTilingData> LayerTilingData::Create(const gfx::Size& tile_size, +scoped_ptr<LayerTilingData> LayerTilingData::Create(gfx::Size tile_size, BorderTexelOption border) { return make_scoped_ptr(new LayerTilingData(tile_size, border)); } -LayerTilingData::LayerTilingData(const gfx::Size& tile_size, - BorderTexelOption border) +LayerTilingData::LayerTilingData(gfx::Size tile_size, BorderTexelOption border) : tiling_data_(tile_size, gfx::Size(), border == HAS_BORDER_TEXELS) { SetTileSize(tile_size); } LayerTilingData::~LayerTilingData() {} -void LayerTilingData::SetTileSize(const gfx::Size& size) { +void LayerTilingData::SetTileSize(gfx::Size size) { if (tile_size() == size) return; @@ -112,7 +111,7 @@ Region LayerTilingData::OpaqueRegionInContentRect( return opaque_region; } -void LayerTilingData::SetBounds(const gfx::Size& size) { +void LayerTilingData::SetBounds(gfx::Size size) { tiling_data_.SetTotalSize(size); if (size.IsEmpty()) { tiles_.clear(); diff --git a/cc/resources/layer_tiling_data.h b/cc/resources/layer_tiling_data.h index 94644d0..500c753 100644 --- a/cc/resources/layer_tiling_data.h +++ b/cc/resources/layer_tiling_data.h @@ -27,7 +27,7 @@ class CC_EXPORT LayerTilingData { ~LayerTilingData(); - static scoped_ptr<LayerTilingData> Create(const gfx::Size& tile_size, + static scoped_ptr<LayerTilingData> Create(gfx::Size tile_size, BorderTexelOption option); bool has_empty_bounds() const { return tiling_data_.has_empty_bounds(); } @@ -41,7 +41,7 @@ class CC_EXPORT LayerTilingData { } // Change the tile size. This may invalidate all the existing tiles. - void SetTileSize(const gfx::Size& size); + void SetTileSize(gfx::Size size); gfx::Size tile_size() const; // Change the border texel setting. This may invalidate all existing tiles. void SetBorderTexelOption(BorderTexelOption option); @@ -81,7 +81,7 @@ class CC_EXPORT LayerTilingData { Tile* TileAt(int i, int j) const; const TileMap& tiles() const { return tiles_; } - void SetBounds(const gfx::Size& size); + void SetBounds(gfx::Size size); gfx::Size bounds() const { return tiling_data_.total_size(); } void ContentRectToTileIndices(const gfx::Rect& rect, @@ -96,7 +96,7 @@ class CC_EXPORT LayerTilingData { void reset() { tiles_.clear(); } protected: - LayerTilingData(const gfx::Size& tile_size, BorderTexelOption option); + LayerTilingData(gfx::Size tile_size, BorderTexelOption option); TileMap tiles_; TilingData tiling_data_; diff --git a/cc/resources/layer_updater.h b/cc/resources/layer_updater.h index d12d7b4..730773f 100644 --- a/cc/resources/layer_updater.h +++ b/cc/resources/layer_updater.h @@ -49,7 +49,7 @@ class CC_EXPORT LayerUpdater : public base::RefCounted<LayerUpdater> { // painted opaque. If the layer is marked opaque in the updater, then this // region should be ignored in preference for the entire layer's area. virtual void PrepareToUpdate(const gfx::Rect& content_rect, - const gfx::Size& tile_size, + gfx::Size tile_size, float contents_width_scale, float contents_height_scale, gfx::Rect* resulting_opaque_rect) {} diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc index cfab6f25..5304127 100644 --- a/cc/resources/picture_layer_tiling.cc +++ b/cc/resources/picture_layer_tiling.cc @@ -19,7 +19,7 @@ namespace cc { scoped_ptr<PictureLayerTiling> PictureLayerTiling::Create( float contents_scale, - const gfx::Size& layer_bounds, + gfx::Size layer_bounds, PictureLayerTilingClient* client) { return make_scoped_ptr(new PictureLayerTiling(contents_scale, layer_bounds, @@ -27,7 +27,7 @@ scoped_ptr<PictureLayerTiling> PictureLayerTiling::Create( } PictureLayerTiling::PictureLayerTiling(float contents_scale, - const gfx::Size& layer_bounds, + gfx::Size layer_bounds, PictureLayerTilingClient* client) : contents_scale_(contents_scale), layer_bounds_(layer_bounds), @@ -125,7 +125,7 @@ void PictureLayerTiling::CreateMissingTilesInLiveTilesRect() { } } -void PictureLayerTiling::SetLayerBounds(const gfx::Size& layer_bounds) { +void PictureLayerTiling::SetLayerBounds(gfx::Size layer_bounds) { if (layer_bounds_ == layer_bounds) return; @@ -341,11 +341,11 @@ void PictureLayerTiling::Reset() { void PictureLayerTiling::UpdateTilePriorities( WhichTree tree, - const gfx::Size& device_viewport, + gfx::Size device_viewport, const gfx::Rect& viewport_in_layer_space, const gfx::Rect& visible_layer_rect, - const gfx::Size& last_layer_bounds, - const gfx::Size& current_layer_bounds, + gfx::Size last_layer_bounds, + gfx::Size current_layer_bounds, float last_layer_contents_scale, float current_layer_contents_scale, const gfx::Transform& last_screen_transform, diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h index f4c5e7c..0c194be 100644 --- a/cc/resources/picture_layer_tiling.h +++ b/cc/resources/picture_layer_tiling.h @@ -31,7 +31,7 @@ class CC_EXPORT PictureLayerTilingClient { const gfx::Rect& content_rect) = 0; virtual void UpdatePile(Tile* tile) = 0; virtual gfx::Size CalculateTileSize( - const gfx::Size& content_bounds) const = 0; + gfx::Size content_bounds) const = 0; virtual const Region* GetInvalidation() = 0; virtual const PictureLayerTiling* GetTwinTiling( const PictureLayerTiling* tiling) const = 0; @@ -47,10 +47,10 @@ class CC_EXPORT PictureLayerTiling { // Create a tiling with no tiles. CreateTiles must be called to add some. static scoped_ptr<PictureLayerTiling> Create( float contents_scale, - const gfx::Size& layer_bounds, + gfx::Size layer_bounds, PictureLayerTilingClient* client); gfx::Size layer_bounds() const { return layer_bounds_; } - void SetLayerBounds(const gfx::Size& layer_bounds); + void SetLayerBounds(gfx::Size layer_bounds); void Invalidate(const Region& layer_region); void CreateMissingTilesInLiveTilesRect(); @@ -135,11 +135,11 @@ class CC_EXPORT PictureLayerTiling { void UpdateTilePriorities( WhichTree tree, - const gfx::Size& device_viewport, + gfx::Size device_viewport, const gfx::Rect& viewport_in_layer_space, const gfx::Rect& visible_layer_rect, - const gfx::Size& last_layer_bounds, - const gfx::Size& current_layer_bounds, + gfx::Size last_layer_bounds, + gfx::Size current_layer_bounds, float last_layer_contents_scale, float current_layer_contents_scale, const gfx::Transform& last_screen_transform, @@ -193,7 +193,7 @@ class CC_EXPORT PictureLayerTiling { typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; PictureLayerTiling(float contents_scale, - const gfx::Size& layer_bounds, + gfx::Size layer_bounds, PictureLayerTilingClient* client); void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); void CreateTile(int i, int j, const PictureLayerTiling* twin_tiling); diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/resources/picture_layer_tiling_set.cc index c8ac648..2047c3a 100644 --- a/cc/resources/picture_layer_tiling_set.cc +++ b/cc/resources/picture_layer_tiling_set.cc @@ -22,7 +22,7 @@ class LargestToSmallestScaleFunctor { PictureLayerTilingSet::PictureLayerTilingSet( PictureLayerTilingClient* client, - const gfx::Size& layer_bounds) + gfx::Size layer_bounds) : client_(client), layer_bounds_(layer_bounds) { } @@ -38,7 +38,7 @@ void PictureLayerTilingSet::SetClient(PictureLayerTilingClient* client) { void PictureLayerTilingSet::SyncTilings( const PictureLayerTilingSet& other, - const gfx::Size& new_layer_bounds, + gfx::Size new_layer_bounds, const Region& layer_invalidation, float minimum_contents_scale) { if (new_layer_bounds.IsEmpty()) { @@ -303,11 +303,11 @@ PictureLayerTilingSet::CoverageIterator::operator bool() const { void PictureLayerTilingSet::UpdateTilePriorities( WhichTree tree, - const gfx::Size& device_viewport, + gfx::Size device_viewport, const gfx::Rect& viewport_in_content_space, const gfx::Rect& visible_content_rect, - const gfx::Size& last_layer_bounds, - const gfx::Size& current_layer_bounds, + gfx::Size last_layer_bounds, + gfx::Size current_layer_bounds, float last_layer_contents_scale, float current_layer_contents_scale, const gfx::Transform& last_screen_transform, diff --git a/cc/resources/picture_layer_tiling_set.h b/cc/resources/picture_layer_tiling_set.h index bff3bd6..fe19d76 100644 --- a/cc/resources/picture_layer_tiling_set.h +++ b/cc/resources/picture_layer_tiling_set.h @@ -15,7 +15,7 @@ namespace cc { class CC_EXPORT PictureLayerTilingSet { public: PictureLayerTilingSet(PictureLayerTilingClient* client, - const gfx::Size& layer_bounds); + gfx::Size layer_bounds); ~PictureLayerTilingSet(); void SetClient(PictureLayerTilingClient* client); @@ -27,7 +27,7 @@ class CC_EXPORT PictureLayerTilingSet { // tilings to |new_layer_bounds|. void SyncTilings( const PictureLayerTilingSet& other, - const gfx::Size& new_layer_bounds, + gfx::Size new_layer_bounds, const Region& layer_invalidation, float minimum_contents_scale); @@ -56,11 +56,11 @@ class CC_EXPORT PictureLayerTilingSet { void UpdateTilePriorities( WhichTree tree, - const gfx::Size& device_viewport, + gfx::Size device_viewport, const gfx::Rect& viewport_in_content_space, const gfx::Rect& visible_content_rect, - const gfx::Size& last_layer_bounds, - const gfx::Size& current_layer_bounds, + gfx::Size last_layer_bounds, + gfx::Size current_layer_bounds, float last_layer_contents_scale, float current_layer_contents_scale, const gfx::Transform& last_screen_transform, diff --git a/cc/resources/picture_layer_tiling_set_unittest.cc b/cc/resources/picture_layer_tiling_set_unittest.cc index 3939f09..96129c6 100644 --- a/cc/resources/picture_layer_tiling_set_unittest.cc +++ b/cc/resources/picture_layer_tiling_set_unittest.cc @@ -157,7 +157,7 @@ class PictureLayerTilingSetSyncTest : public testing::Test { } // Sync from source to target. - void SyncTilings(const gfx::Size& new_bounds, + void SyncTilings(gfx::Size new_bounds, const Region& invalidation, float minimum_scale) { for (size_t i = 0; i < source_->num_tilings(); ++i) @@ -168,19 +168,19 @@ class PictureLayerTilingSetSyncTest : public testing::Test { target_->SyncTilings( *source_.get(), new_bounds, invalidation, minimum_scale); } - void SyncTilings(const gfx::Size& new_bounds) { + void SyncTilings(gfx::Size new_bounds) { Region invalidation; SyncTilings(new_bounds, invalidation, 0.f); } - void SyncTilings(const gfx::Size& new_bounds, const Region& invalidation) { + void SyncTilings(gfx::Size new_bounds, const Region& invalidation) { SyncTilings(new_bounds, invalidation, 0.f); } - void SyncTilings(const gfx::Size& new_bounds, float minimum_scale) { + void SyncTilings(gfx::Size new_bounds, float minimum_scale) { Region invalidation; SyncTilings(new_bounds, invalidation, minimum_scale); } - void VerifyTargetEqualsSource(const gfx::Size& new_bounds) const { + void VerifyTargetEqualsSource(gfx::Size new_bounds) const { ASSERT_FALSE(new_bounds.IsEmpty()); EXPECT_EQ(target_->num_tilings(), source_->num_tilings()); EXPECT_EQ(target_->layer_bounds().ToString(), new_bounds.ToString()); diff --git a/cc/resources/picture_layer_tiling_unittest.cc b/cc/resources/picture_layer_tiling_unittest.cc index 83dc4aa..002e9aad 100644 --- a/cc/resources/picture_layer_tiling_unittest.cc +++ b/cc/resources/picture_layer_tiling_unittest.cc @@ -18,7 +18,7 @@ namespace { static gfx::Rect ViewportInLayerSpace( const gfx::Transform& transform, - const gfx::Size& device_viewport) { + gfx::Size device_viewport) { gfx::Transform inverse; if (!transform.GetInverse(&inverse)) @@ -37,7 +37,7 @@ class TestablePictureLayerTiling : public PictureLayerTiling { static scoped_ptr<TestablePictureLayerTiling> Create( float contents_scale, - const gfx::Size& layer_bounds, + gfx::Size layer_bounds, PictureLayerTilingClient* client) { return make_scoped_ptr(new TestablePictureLayerTiling( contents_scale, @@ -47,7 +47,7 @@ class TestablePictureLayerTiling : public PictureLayerTiling { protected: TestablePictureLayerTiling(float contents_scale, - const gfx::Size& layer_bounds, + gfx::Size layer_bounds, PictureLayerTilingClient* client) : PictureLayerTiling(contents_scale, layer_bounds, client) { } }; @@ -57,9 +57,9 @@ class PictureLayerTilingIteratorTest : public testing::Test { PictureLayerTilingIteratorTest() {} virtual ~PictureLayerTilingIteratorTest() {} - void Initialize(const gfx::Size& tile_size, + void Initialize(gfx::Size tile_size, float contents_scale, - const gfx::Size& layer_bounds) { + gfx::Size layer_bounds) { client_.SetTileSize(tile_size); tiling_ = TestablePictureLayerTiling::Create(contents_scale, layer_bounds, diff --git a/cc/resources/picture_pile_base.cc b/cc/resources/picture_pile_base.cc index 2c87f59..8fedced 100644 --- a/cc/resources/picture_pile_base.cc +++ b/cc/resources/picture_pile_base.cc @@ -87,7 +87,7 @@ PicturePileBase::PicturePileBase( PicturePileBase::~PicturePileBase() { } -void PicturePileBase::Resize(const gfx::Size& new_size) { +void PicturePileBase::Resize(gfx::Size new_size) { if (size() == new_size) return; @@ -136,7 +136,7 @@ void PicturePileBase::SetMinContentsScale(float min_contents_scale) { // static void PicturePileBase::ComputeTileGridInfo( - const gfx::Size& tile_grid_size, + gfx::Size tile_grid_size, SkTileGridPicture::TileGridInfo* info) { DCHECK(info); info->fTileInterval.set(tile_grid_size.width() - 2 * kTileGridBorderPixels, @@ -150,7 +150,7 @@ void PicturePileBase::ComputeTileGridInfo( info->fOffset.set(-kTileGridBorderPixels, -kTileGridBorderPixels); } -void PicturePileBase::SetTileGridSize(const gfx::Size& tile_grid_size) { +void PicturePileBase::SetTileGridSize(gfx::Size tile_grid_size) { ComputeTileGridInfo(tile_grid_size, &tile_grid_info_); } diff --git a/cc/resources/picture_pile_base.h b/cc/resources/picture_pile_base.h index 26f6bdb..2ef6b61 100644 --- a/cc/resources/picture_pile_base.h +++ b/cc/resources/picture_pile_base.h @@ -29,7 +29,7 @@ class CC_EXPORT PicturePileBase : public base::RefCounted<PicturePileBase> { explicit PicturePileBase(const PicturePileBase* other); PicturePileBase(const PicturePileBase* other, unsigned thread_index); - void Resize(const gfx::Size& size); + void Resize(gfx::Size size); gfx::Size size() const { return tiling_.total_size(); } void SetMinContentsScale(float min_contents_scale); @@ -42,10 +42,10 @@ class CC_EXPORT PicturePileBase : public base::RefCounted<PicturePileBase> { bool HasRecordingAt(int x, int y); bool CanRaster(float contents_scale, const gfx::Rect& content_rect); - static void ComputeTileGridInfo(const gfx::Size& tile_grid_size, + static void ComputeTileGridInfo(gfx::Size tile_grid_size, SkTileGridPicture::TileGridInfo* info); - void SetTileGridSize(const gfx::Size& tile_grid_size); + void SetTileGridSize(gfx::Size tile_grid_size); TilingData& tiling() { return tiling_; } scoped_ptr<base::Value> AsValue() const; diff --git a/cc/resources/prioritized_resource.cc b/cc/resources/prioritized_resource.cc index 0fc705a..25415f5 100644 --- a/cc/resources/prioritized_resource.cc +++ b/cc/resources/prioritized_resource.cc @@ -14,7 +14,7 @@ namespace cc { PrioritizedResource::PrioritizedResource(PrioritizedResourceManager* manager, - const gfx::Size& size, + gfx::Size size, ResourceFormat format) : size_(size), format_(format), @@ -45,8 +45,7 @@ void PrioritizedResource::SetTextureManager( manager->RegisterTexture(this); } -void PrioritizedResource::SetDimensions(const gfx::Size& size, - ResourceFormat format) { +void PrioritizedResource::SetDimensions(gfx::Size size, ResourceFormat format) { if (format_ != format || size_ != size) { is_above_priority_cutoff_ = false; format_ = format; @@ -118,7 +117,7 @@ void PrioritizedResource::SetToSelfManagedMemoryPlaceholder(size_t bytes) { PrioritizedResource::Backing::Backing(unsigned id, ResourceProvider* resource_provider, - const gfx::Size& size, + gfx::Size size, ResourceFormat format) : Resource(id, size, format), owner_(NULL), diff --git a/cc/resources/prioritized_resource.h b/cc/resources/prioritized_resource.h index cf8df6a..641782e 100644 --- a/cc/resources/prioritized_resource.h +++ b/cc/resources/prioritized_resource.h @@ -25,7 +25,7 @@ class CC_EXPORT PrioritizedResource { public: static scoped_ptr<PrioritizedResource> Create( PrioritizedResourceManager* manager, - const gfx::Size& size, + gfx::Size size, ResourceFormat format) { return make_scoped_ptr(new PrioritizedResource(manager, size, format)); } @@ -40,7 +40,7 @@ class CC_EXPORT PrioritizedResource { // Setting these to the same value is a no-op. void SetTextureManager(PrioritizedResourceManager* manager); PrioritizedResourceManager* resource_manager() { return manager_; } - void SetDimensions(const gfx::Size& size, ResourceFormat format); + void SetDimensions(gfx::Size size, ResourceFormat format); ResourceFormat format() const { return format_; } gfx::Size size() const { return size_; } size_t bytes() const { return bytes_; } @@ -107,7 +107,7 @@ class CC_EXPORT PrioritizedResource { public: Backing(unsigned id, ResourceProvider* resource_provider, - const gfx::Size& size, + gfx::Size size, ResourceFormat format); ~Backing(); void UpdatePriority(); @@ -150,7 +150,7 @@ class CC_EXPORT PrioritizedResource { }; PrioritizedResource(PrioritizedResourceManager* resource_manager, - const gfx::Size& size, + gfx::Size size, ResourceFormat format); bool is_above_priority_cutoff() { return is_above_priority_cutoff_; } diff --git a/cc/resources/prioritized_resource_manager.cc b/cc/resources/prioritized_resource_manager.cc index 707ad77..da8f055 100644 --- a/cc/resources/prioritized_resource_manager.cc +++ b/cc/resources/prioritized_resource_manager.cc @@ -445,7 +445,7 @@ void PrioritizedResourceManager::ReturnBackingTexture( } PrioritizedResource::Backing* PrioritizedResourceManager::CreateBacking( - const gfx::Size& size, + gfx::Size size, ResourceFormat format, ResourceProvider* resource_provider) { DCHECK(proxy_->IsImplThread() && proxy_->IsMainThreadBlocked()); diff --git a/cc/resources/prioritized_resource_manager.h b/cc/resources/prioritized_resource_manager.h index 092b1d7..9b558a4 100644 --- a/cc/resources/prioritized_resource_manager.h +++ b/cc/resources/prioritized_resource_manager.h @@ -40,7 +40,7 @@ class CC_EXPORT PrioritizedResourceManager { return make_scoped_ptr(new PrioritizedResourceManager(proxy)); } scoped_ptr<PrioritizedResource> CreateTexture( - const gfx::Size& size, ResourceFormat format) { + gfx::Size size, ResourceFormat format) { return make_scoped_ptr(new PrioritizedResource(this, size, format)); } ~PrioritizedResourceManager(); @@ -189,7 +189,7 @@ class CC_EXPORT PrioritizedResourceManager { UnlinkPolicy unlink_policy, ResourceProvider* resource_provider); PrioritizedResource::Backing* CreateBacking( - const gfx::Size& size, + gfx::Size size, ResourceFormat format, ResourceProvider* resource_provider); void EvictFirstBackingResource(ResourceProvider* resource_provider); diff --git a/cc/resources/raster_worker_pool.cc b/cc/resources/raster_worker_pool.cc index 1114fcd..7403f6d 100644 --- a/cc/resources/raster_worker_pool.cc +++ b/cc/resources/raster_worker_pool.cc @@ -121,7 +121,7 @@ class RasterWorkerPoolTaskImpl : public internal::RasterWorkerPoolTask { bool RunRasterOnThread(unsigned thread_index, void* buffer, - const gfx::Size& size, + gfx::Size size, int stride) { TRACE_EVENT2( "cc", @@ -173,7 +173,7 @@ class RasterWorkerPoolTaskImpl : public internal::RasterWorkerPoolTask { // Overridden from internal::RasterWorkerPoolTask: virtual bool RunOnWorkerThread(unsigned thread_index, void* buffer, - const gfx::Size& size, + gfx::Size size, int stride) OVERRIDE { // TODO(alokp): For now run-on-worker-thread implies software rasterization. DCHECK(!use_gpu_rasterization()); diff --git a/cc/resources/raster_worker_pool.h b/cc/resources/raster_worker_pool.h index a0f0831..2490892 100644 --- a/cc/resources/raster_worker_pool.h +++ b/cc/resources/raster_worker_pool.h @@ -50,7 +50,7 @@ class CC_EXPORT RasterWorkerPoolTask // need to be initialized. virtual bool RunOnWorkerThread(unsigned thread_index, void* buffer, - const gfx::Size& size, + gfx::Size size, int stride) = 0; virtual void RunOnOriginThread(ResourceProvider* resource_provider, ContextProvider* context_provider) = 0; diff --git a/cc/resources/raster_worker_pool_unittest.cc b/cc/resources/raster_worker_pool_unittest.cc index 7ceddc9..1f5d95c 100644 --- a/cc/resources/raster_worker_pool_unittest.cc +++ b/cc/resources/raster_worker_pool_unittest.cc @@ -44,7 +44,7 @@ class TestRasterWorkerPoolTaskImpl : public internal::RasterWorkerPoolTask { // Overridden from internal::RasterWorkerPoolTask: virtual bool RunOnWorkerThread(unsigned thread_index, void* buffer, - const gfx::Size& size, + gfx::Size size, int stride) OVERRIDE { raster_thread_ = RASTER_THREAD_WORKER; return true; @@ -85,7 +85,7 @@ class BlockingRasterWorkerPoolTaskImpl : public TestRasterWorkerPoolTaskImpl { // Overridden from internal::RasterWorkerPoolTask: virtual bool RunOnWorkerThread(unsigned thread_index, void* buffer, - const gfx::Size& size, + gfx::Size size, int stride) OVERRIDE { base::AutoLock lock(*lock_); return TestRasterWorkerPoolTaskImpl::RunOnWorkerThread( diff --git a/cc/resources/resource.h b/cc/resources/resource.h index 24cb88a..e9dd393a 100644 --- a/cc/resources/resource.h +++ b/cc/resources/resource.h @@ -15,7 +15,7 @@ namespace cc { class CC_EXPORT Resource { public: Resource() : id_(0) {} - Resource(unsigned id, const gfx::Size& size, ResourceFormat format) + Resource(unsigned id, gfx::Size size, ResourceFormat format) : id_(id), size_(size), format_(format) {} @@ -25,15 +25,14 @@ class CC_EXPORT Resource { ResourceFormat format() const { return format_; } size_t bytes() const; - inline static size_t MemorySizeBytes(const gfx::Size& size, - ResourceFormat format) { + inline static size_t MemorySizeBytes(gfx::Size size, ResourceFormat format) { DCHECK_EQ(0u, (BitsPerPixel(format) * size.width() * size.height()) % 8); return (BitsPerPixel(format) * size.width() * size.height()) / 8; } protected: void set_id(ResourceProvider::ResourceId id) { id_ = id; } - void set_dimensions(const gfx::Size& size, ResourceFormat format) { + void set_dimensions(gfx::Size size, ResourceFormat format) { size_ = size; format_ = format; } diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc index 7170a39..bf5ff3f 100644 --- a/cc/resources/resource_pool.cc +++ b/cc/resources/resource_pool.cc @@ -35,8 +35,7 @@ ResourcePool::~ResourcePool() { DCHECK_EQ(0u, resource_count_); } -scoped_ptr<ScopedResource> ResourcePool::AcquireResource( - const gfx::Size& size) { +scoped_ptr<ScopedResource> ResourcePool::AcquireResource(gfx::Size size) { for (ResourceList::iterator it = unused_resources_.begin(); it != unused_resources_.end(); ++it) { diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h index e321d08..d05534d 100644 --- a/cc/resources/resource_pool.h +++ b/cc/resources/resource_pool.h @@ -26,7 +26,7 @@ class CC_EXPORT ResourcePool { virtual ~ResourcePool(); - scoped_ptr<ScopedResource> AcquireResource(const gfx::Size& size); + scoped_ptr<ScopedResource> AcquireResource(gfx::Size size); void ReleaseResource(scoped_ptr<ScopedResource>); void SetResourceUsageLimits(size_t max_memory_usage_bytes, diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc index 8b9453f..b431648 100644 --- a/cc/resources/resource_provider.cc +++ b/cc/resources/resource_provider.cc @@ -197,7 +197,7 @@ ResourceProvider::Resource::Resource() ResourceProvider::Resource::~Resource() {} ResourceProvider::Resource::Resource(GLuint texture_id, - const gfx::Size& size, + gfx::Size size, GLenum target, GLenum filter, GLenum texture_pool, @@ -240,7 +240,7 @@ ResourceProvider::Resource::Resource(GLuint texture_id, ResourceProvider::Resource::Resource(uint8_t* pixels, SharedBitmap* bitmap, - const gfx::Size& size, + gfx::Size size, GLenum filter, GLint wrap_mode) : child_id(0), @@ -330,7 +330,7 @@ bool ResourceProvider::IsLost(ResourceId id) { } ResourceProvider::ResourceId ResourceProvider::CreateResource( - const gfx::Size& size, + gfx::Size size, GLint wrap_mode, TextureUsageHint hint, ResourceFormat format) { @@ -355,7 +355,7 @@ ResourceProvider::ResourceId ResourceProvider::CreateResource( } ResourceProvider::ResourceId ResourceProvider::CreateManagedResource( - const gfx::Size& size, + gfx::Size size, GLenum target, GLint wrap_mode, TextureUsageHint hint, @@ -381,7 +381,7 @@ ResourceProvider::ResourceId ResourceProvider::CreateManagedResource( } ResourceProvider::ResourceId ResourceProvider::CreateGLTexture( - const gfx::Size& size, + gfx::Size size, GLenum target, GLenum texture_pool, GLint wrap_mode, @@ -400,7 +400,7 @@ ResourceProvider::ResourceId ResourceProvider::CreateGLTexture( } ResourceProvider::ResourceId ResourceProvider::CreateBitmap( - const gfx::Size& size, GLint wrap_mode) { + gfx::Size size, GLint wrap_mode) { DCHECK(thread_checker_.CalledOnValidThread()); scoped_ptr<SharedBitmap> bitmap; diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h index c53cf8f..836eae3 100644 --- a/cc/resources/resource_provider.h +++ b/cc/resources/resource_provider.h @@ -97,28 +97,28 @@ class CC_EXPORT ResourceProvider { ResourceType GetResourceType(ResourceId id); // Creates a resource of the default resource type. - ResourceId CreateResource(const gfx::Size& size, + ResourceId CreateResource(gfx::Size size, GLint wrap_mode, TextureUsageHint hint, ResourceFormat format); // Creates a resource which is tagged as being managed for GPU memory // accounting purposes. - ResourceId CreateManagedResource(const gfx::Size& size, + ResourceId CreateManagedResource(gfx::Size size, GLenum target, GLint wrap_mode, TextureUsageHint hint, ResourceFormat format); // You can also explicitly create a specific resource type. - ResourceId CreateGLTexture(const gfx::Size& size, + ResourceId CreateGLTexture(gfx::Size size, GLenum target, GLenum texture_pool, GLint wrap_mode, TextureUsageHint hint, ResourceFormat format); - ResourceId CreateBitmap(const gfx::Size& size, GLint wrap_mode); + ResourceId CreateBitmap(gfx::Size size, GLint wrap_mode); // Wraps an external texture into a GL resource. ResourceId CreateResourceFromExternalTexture( unsigned texture_target, @@ -366,7 +366,7 @@ class CC_EXPORT ResourceProvider { Resource(); ~Resource(); Resource(unsigned texture_id, - const gfx::Size& size, + gfx::Size size, GLenum target, GLenum filter, GLenum texture_pool, @@ -375,7 +375,7 @@ class CC_EXPORT ResourceProvider { ResourceFormat format); Resource(uint8_t* pixels, SharedBitmap* bitmap, - const gfx::Size& size, + gfx::Size size, GLenum filter, GLint wrap_mode); diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc index bce6d5a..f96982f 100644 --- a/cc/resources/resource_provider_unittest.cc +++ b/cc/resources/resource_provider_unittest.cc @@ -64,7 +64,7 @@ static void ReleaseSharedMemoryCallback( } static scoped_ptr<base::SharedMemory> CreateAndFillSharedMemory( - const gfx::Size& size, + gfx::Size size, uint32_t value) { scoped_ptr<base::SharedMemory> shared_memory(new base::SharedMemory); CHECK(shared_memory->CreateAndMapAnonymous(4 * size.GetArea())); @@ -264,9 +264,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D { namespace_->textures.Replace(BoundTextureId(target), texture); } - void GetPixels(const gfx::Size& size, - ResourceFormat format, - uint8_t* pixels) { + void GetPixels(gfx::Size size, ResourceFormat format, uint8_t* pixels) { CheckTextureIsBound(GL_TEXTURE_2D); base::AutoLock lock_for_texture_access(namespace_->lock); scoped_refptr<TestTexture> texture = BoundTexture(GL_TEXTURE_2D); @@ -281,7 +279,7 @@ class ResourceProviderContext : public TestWebGraphicsContext3D { last_waited_sync_point_(0) {} private: - void AllocateTexture(const gfx::Size& size, GLenum format) { + void AllocateTexture(gfx::Size size, GLenum format) { CheckTextureIsBound(GL_TEXTURE_2D); ResourceFormat texture_format = RGBA_8888; switch (format) { @@ -342,7 +340,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { TestSharedBitmapManager() : count_(0) {} virtual ~TestSharedBitmapManager() {} - virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size& size) + virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(gfx::Size size) OVERRIDE { scoped_ptr<base::SharedMemory> memory(new base::SharedMemory); memory->CreateAndMapAnonymous(size.GetArea() * 4); @@ -356,7 +354,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { } virtual scoped_ptr<SharedBitmap> GetSharedBitmapFromId( - const gfx::Size&, + gfx::Size, const SharedBitmapId& id) OVERRIDE { if (bitmap_map_.find(id) == bitmap_map_.end()) return scoped_ptr<SharedBitmap>(); @@ -383,7 +381,7 @@ class TestSharedBitmapManager : public SharedBitmapManager { void GetResourcePixels(ResourceProvider* resource_provider, ResourceProviderContext* context, ResourceProvider::ResourceId id, - const gfx::Size& size, + gfx::Size size, ResourceFormat format, uint8_t* pixels) { switch (resource_provider->default_resource_type()) { diff --git a/cc/resources/scoped_resource.cc b/cc/resources/scoped_resource.cc index a320bab..99f93c9 100644 --- a/cc/resources/scoped_resource.cc +++ b/cc/resources/scoped_resource.cc @@ -15,7 +15,7 @@ ScopedResource::~ScopedResource() { Free(); } -void ScopedResource::Allocate(const gfx::Size& size, +void ScopedResource::Allocate(gfx::Size size, ResourceProvider::TextureUsageHint hint, ResourceFormat format) { DCHECK(!id()); @@ -30,7 +30,7 @@ void ScopedResource::Allocate(const gfx::Size& size, #endif } -void ScopedResource::AllocateManaged(const gfx::Size& size, +void ScopedResource::AllocateManaged(gfx::Size size, GLenum target, ResourceFormat format) { DCHECK(!id()); diff --git a/cc/resources/scoped_resource.h b/cc/resources/scoped_resource.h index eebddc1..63f2cd4 100644 --- a/cc/resources/scoped_resource.h +++ b/cc/resources/scoped_resource.h @@ -25,12 +25,10 @@ class CC_EXPORT ScopedResource : public Resource { } virtual ~ScopedResource(); - void Allocate(const gfx::Size& size, + void Allocate(gfx::Size size, ResourceProvider::TextureUsageHint hint, ResourceFormat format); - void AllocateManaged(const gfx::Size& size, - GLenum target, - ResourceFormat format); + void AllocateManaged(gfx::Size size, GLenum target, ResourceFormat format); void Free(); void Leak(); diff --git a/cc/resources/shared_bitmap_manager.h b/cc/resources/shared_bitmap_manager.h index 70eaed5..53dd156 100644 --- a/cc/resources/shared_bitmap_manager.h +++ b/cc/resources/shared_bitmap_manager.h @@ -16,9 +16,9 @@ class CC_EXPORT SharedBitmapManager { public: SharedBitmapManager() {} - virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(const gfx::Size&) = 0; + virtual scoped_ptr<SharedBitmap> AllocateSharedBitmap(gfx::Size) = 0; virtual scoped_ptr<SharedBitmap> GetSharedBitmapFromId( - const gfx::Size&, + gfx::Size, const SharedBitmapId&) = 0; virtual scoped_ptr<SharedBitmap> GetBitmapForSharedMemory( base::SharedMemory*) = 0; diff --git a/cc/resources/skpicture_content_layer_updater.cc b/cc/resources/skpicture_content_layer_updater.cc index a08b2b4..5242686 100644 --- a/cc/resources/skpicture_content_layer_updater.cc +++ b/cc/resources/skpicture_content_layer_updater.cc @@ -23,7 +23,7 @@ SkPictureContentLayerUpdater::~SkPictureContentLayerUpdater() {} void SkPictureContentLayerUpdater::PrepareToUpdate( const gfx::Rect& content_rect, - const gfx::Size&, + gfx::Size, float contents_width_scale, float contents_height_scale, gfx::Rect* resulting_opaque_rect) { diff --git a/cc/resources/skpicture_content_layer_updater.h b/cc/resources/skpicture_content_layer_updater.h index e5891841..0e83d42 100644 --- a/cc/resources/skpicture_content_layer_updater.h +++ b/cc/resources/skpicture_content_layer_updater.h @@ -25,7 +25,7 @@ class SkPictureContentLayerUpdater : public ContentLayerUpdater { virtual ~SkPictureContentLayerUpdater(); virtual void PrepareToUpdate(const gfx::Rect& content_rect, - const gfx::Size& tile_size, + gfx::Size tile_size, float contents_width_scale, float contents_height_scale, gfx::Rect* resulting_opaque_rect) OVERRIDE; diff --git a/cc/resources/texture_mailbox.cc b/cc/resources/texture_mailbox.cc index 074967f..149d56c 100644 --- a/cc/resources/texture_mailbox.cc +++ b/cc/resources/texture_mailbox.cc @@ -50,7 +50,7 @@ TextureMailbox::TextureMailbox(const gpu::Mailbox& mailbox_name, } TextureMailbox::TextureMailbox(base::SharedMemory* shared_memory, - const gfx::Size& size) + gfx::Size size) : target_(GL_TEXTURE_2D), sync_point_(0), shared_memory_(shared_memory), diff --git a/cc/resources/texture_mailbox.h b/cc/resources/texture_mailbox.h index 8ff87cc..a9b021b 100644 --- a/cc/resources/texture_mailbox.h +++ b/cc/resources/texture_mailbox.h @@ -28,7 +28,7 @@ class CC_EXPORT TextureMailbox { unsigned texture_target, unsigned sync_point); TextureMailbox(base::SharedMemory* shared_memory, - const gfx::Size& size); + gfx::Size size); ~TextureMailbox(); diff --git a/cc/resources/tile.cc b/cc/resources/tile.cc index 7b1f00a..0c407e5 100644 --- a/cc/resources/tile.cc +++ b/cc/resources/tile.cc @@ -15,7 +15,7 @@ Tile::Id Tile::s_next_id_ = 0; Tile::Tile(TileManager* tile_manager, PicturePileImpl* picture_pile, - const gfx::Size& tile_size, + gfx::Size tile_size, const gfx::Rect& content_rect, const gfx::Rect& opaque_rect, float contents_scale, diff --git a/cc/resources/tile.h b/cc/resources/tile.h index c0ed843..621a2e2 100644 --- a/cc/resources/tile.h +++ b/cc/resources/tile.h @@ -135,7 +135,7 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { // Methods called by by tile manager. Tile(TileManager* tile_manager, PicturePileImpl* picture_pile, - const gfx::Size& tile_size, + gfx::Size tile_size, const gfx::Rect& content_rect, const gfx::Rect& opaque_rect, float contents_scale, diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc index 4f9f0ae..4c6fc81 100644 --- a/cc/resources/tile_manager.cc +++ b/cc/resources/tile_manager.cc @@ -957,7 +957,7 @@ void TileManager::OnRasterTaskCompleted( } scoped_refptr<Tile> TileManager::CreateTile(PicturePileImpl* picture_pile, - const gfx::Size& tile_size, + gfx::Size tile_size, const gfx::Rect& content_rect, const gfx::Rect& opaque_rect, float contents_scale, diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h index 0e7de2c..38d0465 100644 --- a/cc/resources/tile_manager.h +++ b/cc/resources/tile_manager.h @@ -66,7 +66,7 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient, bool UpdateVisibleTiles(); scoped_refptr<Tile> CreateTile(PicturePileImpl* picture_pile, - const gfx::Size& tile_size, + gfx::Size tile_size, const gfx::Rect& content_rect, const gfx::Rect& opaque_rect, float contents_scale, diff --git a/cc/resources/tile_manager_unittest.cc b/cc/resources/tile_manager_unittest.cc index 56f062e..bdf466b 100644 --- a/cc/resources/tile_manager_unittest.cc +++ b/cc/resources/tile_manager_unittest.cc @@ -76,7 +76,7 @@ class TileManagerTest : public testing::TestWithParam<bool> { TileVector CreateTilesWithSize(int count, TilePriority active_priority, TilePriority pending_priority, - const gfx::Size& tile_size) { + gfx::Size tile_size) { TileVector tiles; for (int i = 0; i < count; ++i) { scoped_refptr<Tile> tile = tile_manager_->CreateTile(picture_pile_.get(), diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc index 54e4a5c..bae7468 100644 --- a/cc/resources/video_resource_updater.cc +++ b/cc/resources/video_resource_updater.cc @@ -89,7 +89,7 @@ bool VideoResourceUpdater::VerifyFrame( // each plane in the frame. static gfx::Size SoftwarePlaneDimension( media::VideoFrame::Format input_frame_format, - const gfx::Size& coded_size, + gfx::Size coded_size, ResourceFormat output_resource_format, int plane_index) { if (output_resource_format == kYUVResourceFormat) { diff --git a/cc/resources/video_resource_updater.h b/cc/resources/video_resource_updater.h index 11ad2d0..2a27739 100644 --- a/cc/resources/video_resource_updater.h +++ b/cc/resources/video_resource_updater.h @@ -80,7 +80,7 @@ class CC_EXPORT VideoResourceUpdater gpu::Mailbox mailbox; PlaneResource(unsigned resource_id, - const gfx::Size& resource_size, + gfx::Size resource_size, ResourceFormat resource_format, gpu::Mailbox mailbox) : resource_id(resource_id), @@ -98,7 +98,7 @@ class CC_EXPORT VideoResourceUpdater struct RecycleResourceData { unsigned resource_id; - const gfx::Size& resource_size; + gfx::Size resource_size; ResourceFormat resource_format; gpu::Mailbox mailbox; }; diff --git a/cc/scheduler/texture_uploader.cc b/cc/scheduler/texture_uploader.cc index b15fe41..e194ede 100644 --- a/cc/scheduler/texture_uploader.cc +++ b/cc/scheduler/texture_uploader.cc @@ -133,7 +133,7 @@ void TextureUploader::Upload(const uint8* image, const gfx::Rect& source_rect, gfx::Vector2d dest_offset, ResourceFormat format, - const gfx::Size& size) { + gfx::Size size) { CHECK(image_rect.Contains(source_rect)); bool is_full_upload = dest_offset.IsZero() && source_rect.size() == size; @@ -287,7 +287,7 @@ void TextureUploader::UploadWithMapTexSubImage(const uint8* image, } void TextureUploader::UploadWithTexImageETC1(const uint8* image, - const gfx::Size& size) { + gfx::Size size) { TRACE_EVENT0("cc", "TextureUploader::UploadWithTexImageETC1"); DCHECK_EQ(0, size.width() % 4); DCHECK_EQ(0, size.height() % 4); diff --git a/cc/scheduler/texture_uploader.h b/cc/scheduler/texture_uploader.h index 709cb31..362f001 100644 --- a/cc/scheduler/texture_uploader.h +++ b/cc/scheduler/texture_uploader.h @@ -47,7 +47,7 @@ class CC_EXPORT TextureUploader { const gfx::Rect& source_rect, gfx::Vector2d dest_offset, ResourceFormat format, - const gfx::Size& size); + gfx::Size size); void Flush(); void ReleaseCachedQueries(); @@ -101,7 +101,7 @@ class CC_EXPORT TextureUploader { const gfx::Rect& source_rect, gfx::Vector2d dest_offset, ResourceFormat format); - void UploadWithTexImageETC1(const uint8* image, const gfx::Size& size); + void UploadWithTexImageETC1(const uint8* image, gfx::Size size); gpu::gles2::GLES2Interface* gl_; ScopedPtrDeque<Query> pending_queries_; diff --git a/cc/scheduler/texture_uploader_unittest.cc b/cc/scheduler/texture_uploader_unittest.cc index 7454f75..792216c 100644 --- a/cc/scheduler/texture_uploader_unittest.cc +++ b/cc/scheduler/texture_uploader_unittest.cc @@ -145,7 +145,7 @@ class TextureUploadTestContext : public gpu::gles2::GLES2InterfaceStub { void UploadTexture(TextureUploader* uploader, ResourceFormat format, - const gfx::Size& size, + gfx::Size size, const uint8* data) { uploader->Upload(data, gfx::Rect(size), diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc index 4241ae0..6e9ffde 100644 --- a/cc/test/fake_picture_layer_impl.cc +++ b/cc/test/fake_picture_layer_impl.cc @@ -36,7 +36,7 @@ void FakePictureLayerImpl::AppendQuads(QuadSink* quad_sink, } gfx::Size FakePictureLayerImpl::CalculateTileSize( - const gfx::Size& content_bounds) const { + gfx::Size content_bounds) const { if (fixed_tile_size_.IsEmpty()) { return PictureLayerImpl::CalculateTileSize(content_bounds); } diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h index 477b6b9..a289934 100644 --- a/cc/test/fake_picture_layer_impl.h +++ b/cc/test/fake_picture_layer_impl.h @@ -26,8 +26,7 @@ class FakePictureLayerImpl : public PictureLayerImpl { OVERRIDE; virtual void AppendQuads(QuadSink* quad_sink, AppendQuadsData* append_quads_data) OVERRIDE; - virtual gfx::Size CalculateTileSize( - const gfx::Size& content_bounds) const OVERRIDE; + virtual gfx::Size CalculateTileSize(gfx::Size content_bounds) const OVERRIDE; using PictureLayerImpl::AddTiling; using PictureLayerImpl::CleanUpTilingsOnActiveLayer; @@ -55,7 +54,7 @@ class FakePictureLayerImpl : public PictureLayerImpl { const Region& invalidation() const { return invalidation_; } void set_invalidation(const Region& region) { invalidation_ = region; } - void set_fixed_tile_size(const gfx::Size& size) { fixed_tile_size_ = size; } + void set_fixed_tile_size(gfx::Size size) { fixed_tile_size_ = size; } void CreateDefaultTilingsAndTiles(); void SetAllTilesVisible(); diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc index f891b9e..acbd791 100644 --- a/cc/test/fake_picture_layer_tiling_client.cc +++ b/cc/test/fake_picture_layer_tiling_client.cc @@ -49,12 +49,12 @@ scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( pile_.get(), tile_size_, rect, gfx::Rect(), 1, 0, 0, Tile::USE_LCD_TEXT); } -void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { +void FakePictureLayerTilingClient::SetTileSize(gfx::Size tile_size) { tile_size_ = tile_size; } gfx::Size FakePictureLayerTilingClient::CalculateTileSize( - const gfx::Size& /* content_bounds */) const { + gfx::Size /* content_bounds */) const { return tile_size_; } diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h index 6383a22..2e4e9d6 100644 --- a/cc/test/fake_picture_layer_tiling_client.h +++ b/cc/test/fake_picture_layer_tiling_client.h @@ -25,9 +25,9 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { PictureLayerTiling* tiling, const gfx::Rect& rect) OVERRIDE; virtual void UpdatePile(Tile* tile) OVERRIDE {} virtual gfx::Size CalculateTileSize( - const gfx::Size& content_bounds) const OVERRIDE; + gfx::Size content_bounds) const OVERRIDE; - void SetTileSize(const gfx::Size& tile_size); + void SetTileSize(gfx::Size tile_size); gfx::Size TileSize() const { return tile_size_; } scoped_refptr<PicturePileImpl> pile() { return pile_; } const PicturePileImpl* pile() const { return pile_.get(); } diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc index 9b168e6..bc751ed 100644 --- a/cc/test/fake_picture_pile_impl.cc +++ b/cc/test/fake_picture_pile_impl.cc @@ -17,8 +17,8 @@ FakePicturePileImpl::FakePicturePileImpl() {} FakePicturePileImpl::~FakePicturePileImpl() {} scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreateFilledPile( - const gfx::Size& tile_size, - const gfx::Size& layer_bounds) { + gfx::Size tile_size, + gfx::Size layer_bounds) { scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl()); pile->tiling().SetTotalSize(layer_bounds); pile->tiling().SetMaxTextureSize(tile_size); @@ -32,8 +32,8 @@ scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreateFilledPile( } scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreateEmptyPile( - const gfx::Size& tile_size, - const gfx::Size& layer_bounds) { + gfx::Size tile_size, + gfx::Size layer_bounds) { scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl()); pile->tiling().SetTotalSize(layer_bounds); pile->tiling().SetMaxTextureSize(tile_size); @@ -44,8 +44,8 @@ scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreateEmptyPile( scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreatePileWithRecordedRegion( - const gfx::Size& tile_size, - const gfx::Size& layer_bounds, + gfx::Size tile_size, + gfx::Size layer_bounds, const Region& recorded_region) { scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl()); pile->tiling().SetTotalSize(layer_bounds); diff --git a/cc/test/fake_picture_pile_impl.h b/cc/test/fake_picture_pile_impl.h index ae424bb..20d44e3 100644 --- a/cc/test/fake_picture_pile_impl.h +++ b/cc/test/fake_picture_pile_impl.h @@ -14,16 +14,16 @@ namespace cc { class FakePicturePileImpl : public PicturePileImpl { public: static scoped_refptr<FakePicturePileImpl> CreateFilledPile( - const gfx::Size& tile_size, - const gfx::Size& layer_bounds); + gfx::Size tile_size, + gfx::Size layer_bounds); static scoped_refptr<FakePicturePileImpl> CreateEmptyPile( - const gfx::Size& tile_size, - const gfx::Size& layer_bounds); + gfx::Size tile_size, + gfx::Size layer_bounds); static scoped_refptr<FakePicturePileImpl> CreatePileWithRecordedRegion( - const gfx::Size& tile_size, - const gfx::Size& layer_bounds, + gfx::Size tile_size, + gfx::Size layer_bounds, const Region& recorded_region); static scoped_refptr<FakePicturePileImpl> CreatePile(); diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc index c5d2125..806b877 100644 --- a/cc/test/layer_tree_pixel_test.cc +++ b/cc/test/layer_tree_pixel_test.cc @@ -228,7 +228,7 @@ void LayerTreePixelTest::SetupTree() { } scoped_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap( - const gfx::Size& size, + gfx::Size size, const TextureMailbox& texture_mailbox) { DCHECK(texture_mailbox.IsTexture()); if (!texture_mailbox.IsTexture()) diff --git a/cc/test/layer_tree_pixel_test.h b/cc/test/layer_tree_pixel_test.h index 426cd02..a72f1db 100644 --- a/cc/test/layer_tree_pixel_test.h +++ b/cc/test/layer_tree_pixel_test.h @@ -75,7 +75,7 @@ class LayerTreePixelTest : public LayerTreeTest { base::FilePath file_name); scoped_ptr<SkBitmap> CopyTextureMailboxToBitmap( - const gfx::Size& size, + gfx::Size size, const TextureMailbox& texture_mailbox); void CopyBitmapToTextureMailboxAsTexture( diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index e84540e..1257be6 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -137,7 +137,7 @@ void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { 0).PassAs<DirectRenderer>(); } -void PixelTest::ForceExpandedViewport(const gfx::Size& surface_expansion) { +void PixelTest::ForceExpandedViewport(gfx::Size surface_expansion) { static_cast<PixelTestOutputSurface*>(output_surface_.get()) ->set_surface_expansion_size(surface_expansion); SoftwareOutputDevice* device = output_surface_->software_device(); diff --git a/cc/test/pixel_test.h b/cc/test/pixel_test.h index 6d5c552..b6e0242 100644 --- a/cc/test/pixel_test.h +++ b/cc/test/pixel_test.h @@ -59,7 +59,7 @@ class PixelTest : public testing::Test, RendererClient { void SetUpGLRenderer(bool use_skia_gpu_backend); void SetUpSoftwareRenderer(); - void ForceExpandedViewport(const gfx::Size& surface_expansion); + void ForceExpandedViewport(gfx::Size surface_expansion); void ForceViewportOffset(gfx::Vector2d viewport_offset); void ForceDeviceClip(const gfx::Rect& clip); void EnableExternalStencilTest(); diff --git a/cc/test/pixel_test_output_surface.cc b/cc/test/pixel_test_output_surface.cc index c773a52..e3f62bd 100644 --- a/cc/test/pixel_test_output_surface.cc +++ b/cc/test/pixel_test_output_surface.cc @@ -17,8 +17,7 @@ PixelTestOutputSurface::PixelTestOutputSurface( scoped_ptr<SoftwareOutputDevice> software_device) : OutputSurface(software_device.Pass()), external_stencil_test_(false) {} -void PixelTestOutputSurface::Reshape(const gfx::Size& size, - float scale_factor) { +void PixelTestOutputSurface::Reshape(gfx::Size size, float scale_factor) { gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), size.height() + surface_expansion_size_.height()); OutputSurface::Reshape(expanded_size, scale_factor); diff --git a/cc/test/pixel_test_output_surface.h b/cc/test/pixel_test_output_surface.h index d3ec612..2a4573a 100644 --- a/cc/test/pixel_test_output_surface.h +++ b/cc/test/pixel_test_output_surface.h @@ -16,10 +16,10 @@ class PixelTestOutputSurface : public OutputSurface { explicit PixelTestOutputSurface( scoped_ptr<SoftwareOutputDevice> software_device); - virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE; + virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; virtual bool HasExternalStencilTest() const OVERRIDE; - void set_surface_expansion_size(const gfx::Size& surface_expansion_size) { + void set_surface_expansion_size(gfx::Size surface_expansion_size) { surface_expansion_size_ = surface_expansion_size; } void set_has_external_stencil_test(bool has_test) { diff --git a/cc/test/pixel_test_software_output_device.cc b/cc/test/pixel_test_software_output_device.cc index a8d986c..d4f0b88 100644 --- a/cc/test/pixel_test_software_output_device.cc +++ b/cc/test/pixel_test_software_output_device.cc @@ -6,7 +6,7 @@ namespace cc { -void PixelTestSoftwareOutputDevice::Resize(const gfx::Size& size) { +void PixelTestSoftwareOutputDevice::Resize(gfx::Size size) { gfx::Size expanded_size(size.width() + surface_expansion_size_.width(), size.height() + surface_expansion_size_.height()); SoftwareOutputDevice::Resize(expanded_size); diff --git a/cc/test/pixel_test_software_output_device.h b/cc/test/pixel_test_software_output_device.h index 7c1dae6..b652063 100644 --- a/cc/test/pixel_test_software_output_device.h +++ b/cc/test/pixel_test_software_output_device.h @@ -11,9 +11,9 @@ namespace cc { class PixelTestSoftwareOutputDevice : public SoftwareOutputDevice { public: - virtual void Resize(const gfx::Size& size) OVERRIDE; + virtual void Resize(gfx::Size size) OVERRIDE; - void set_surface_expansion_size(const gfx::Size& surface_expansion_size) { + void set_surface_expansion_size(gfx::Size surface_expansion_size) { surface_expansion_size_ = surface_expansion_size; } diff --git a/cc/test/skia_common.cc b/cc/test/skia_common.cc index 277a124..dfccd64 100644 --- a/cc/test/skia_common.cc +++ b/cc/test/skia_common.cc @@ -25,7 +25,7 @@ void DrawPicture(unsigned char* buffer, picture->Raster(&canvas, NULL, layer_rect, 1.0f); } -void CreateBitmap(const gfx::Size& size, const char* uri, SkBitmap* bitmap) { +void CreateBitmap(gfx::Size size, const char* uri, SkBitmap* bitmap) { SkImageInfo info = { size.width(), size.height(), diff --git a/cc/test/skia_common.h b/cc/test/skia_common.h index 3bafa0b..3424799 100644 --- a/cc/test/skia_common.h +++ b/cc/test/skia_common.h @@ -23,7 +23,7 @@ void DrawPicture(unsigned char* buffer, const gfx::Rect& layer_rect, scoped_refptr<Picture> picture); -void CreateBitmap(const gfx::Size& size, const char* uri, SkBitmap* bitmap); +void CreateBitmap(gfx::Size size, const char* uri, SkBitmap* bitmap); } // namespace cc diff --git a/cc/test/test_texture.cc b/cc/test/test_texture.cc index 8addc79..0f4f07c 100644 --- a/cc/test/test_texture.cc +++ b/cc/test/test_texture.cc @@ -9,7 +9,7 @@ namespace cc { -size_t TextureSizeBytes(const gfx::Size& size, ResourceFormat format) { +size_t TextureSizeBytes(gfx::Size size, ResourceFormat format) { unsigned int components_per_pixel = 4; unsigned int bytes_per_component = 1; return size.width() * size.height() * components_per_pixel * @@ -28,7 +28,7 @@ TestTexture::TestTexture() : format(RGBA_8888) { TestTexture::~TestTexture() {} -void TestTexture::Reallocate(const gfx::Size& size, ResourceFormat format) { +void TestTexture::Reallocate(gfx::Size size, ResourceFormat format) { this->size = size; this->format = format; this->data.reset(new uint8_t[TextureSizeBytes(size, format)]); diff --git a/cc/test/test_texture.h b/cc/test/test_texture.h index 0e50bf0..f5070e1 100644 --- a/cc/test/test_texture.h +++ b/cc/test/test_texture.h @@ -14,12 +14,12 @@ namespace cc { -size_t TextureSizeBytes(const gfx::Size& size, ResourceFormat format); +size_t TextureSizeBytes(gfx::Size size, ResourceFormat format); struct TestTexture : public base::RefCounted<TestTexture> { TestTexture(); - void Reallocate(const gfx::Size& size, ResourceFormat format); + void Reallocate(gfx::Size size, ResourceFormat format); bool IsValidParameter(GLenum pname); gfx::Size size; diff --git a/cc/test/tiled_layer_test_common.cc b/cc/test/tiled_layer_test_common.cc index e39765e..6dddfd3 100644 --- a/cc/test/tiled_layer_test_common.cc +++ b/cc/test/tiled_layer_test_common.cc @@ -35,7 +35,7 @@ FakeLayerUpdater::FakeLayerUpdater() : prepare_count_(0), update_count_(0) {} FakeLayerUpdater::~FakeLayerUpdater() {} void FakeLayerUpdater::PrepareToUpdate(const gfx::Rect& content_rect, - const gfx::Size& tile_size, + gfx::Size tile_size, float contents_width_scale, float contents_height_scale, gfx::Rect* resulting_opaque_rect) { @@ -148,7 +148,7 @@ LayerUpdater* FakeTiledLayer::Updater() const { } void FakeTiledLayerWithScaledBounds::SetContentBounds( - const gfx::Size& content_bounds) { + gfx::Size content_bounds) { forced_content_bounds_ = content_bounds; draw_properties().content_bounds = forced_content_bounds_; } diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h index 1e1aace..17de629 100644 --- a/cc/test/tiled_layer_test_common.h +++ b/cc/test/tiled_layer_test_common.h @@ -46,7 +46,7 @@ class FakeLayerUpdater : public LayerUpdater { PrioritizedResourceManager* resource) OVERRIDE; virtual void PrepareToUpdate(const gfx::Rect& content_rect, - const gfx::Size& tile_size, + gfx::Size tile_size, float contents_width_scale, float contents_height_scale, gfx::Rect* resulting_opaque_rect) OVERRIDE; @@ -139,7 +139,7 @@ class FakeTiledLayerWithScaledBounds : public FakeTiledLayer { explicit FakeTiledLayerWithScaledBounds( PrioritizedResourceManager* resource_manager); - void SetContentBounds(const gfx::Size& content_bounds); + void SetContentBounds(gfx::Size content_bounds); virtual void CalculateContentsScale(float ideal_contents_scale, float device_scale_factor, float page_scale_factor, diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc index 2c17cac..0684a9c 100644 --- a/cc/trees/layer_tree_host.cc +++ b/cc/trees/layer_tree_host.cc @@ -638,7 +638,7 @@ void LayerTreeHost::SetDebugState(const LayerTreeDebugState& debug_state) { SetNeedsCommit(); } -void LayerTreeHost::SetViewportSize(const gfx::Size& device_viewport_size) { +void LayerTreeHost::SetViewportSize(gfx::Size device_viewport_size) { if (device_viewport_size == device_viewport_size_) return; diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h index 76dc680..867bb19 100644 --- a/cc/trees/layer_tree_host.h +++ b/cc/trees/layer_tree_host.h @@ -201,7 +201,7 @@ class CC_EXPORT LayerTreeHost { void SetDebugState(const LayerTreeDebugState& debug_state); const LayerTreeDebugState& debug_state() const { return debug_state_; } - void SetViewportSize(const gfx::Size& device_viewport_size); + void SetViewportSize(gfx::Size device_viewport_size); void SetOverdrawBottomHeight(float overdraw_bottom_height); gfx::Size device_viewport_size() const { return device_viewport_size_; } diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h index 57ea16d..cd30b93 100644 --- a/cc/trees/layer_tree_host_common.h +++ b/cc/trees/layer_tree_host_common.h @@ -32,7 +32,7 @@ class CC_EXPORT LayerTreeHostCommon { struct CalcDrawPropsInputs { public: CalcDrawPropsInputs(LayerType* root_layer, - const gfx::Size& device_viewport_size, + gfx::Size device_viewport_size, const gfx::Transform& device_transform, float device_scale_factor, float page_scale_factor, @@ -72,12 +72,12 @@ class CC_EXPORT LayerTreeHostCommon { : public CalcDrawPropsInputs<LayerType, RenderSurfaceLayerListType> { CalcDrawPropsInputsForTesting( LayerType* root_layer, - const gfx::Size& device_viewport_size, + gfx::Size device_viewport_size, const gfx::Transform& device_transform, RenderSurfaceLayerListType* render_surface_layer_list); CalcDrawPropsInputsForTesting( LayerType* root_layer, - const gfx::Size& device_viewport_size, + gfx::Size device_viewport_size, RenderSurfaceLayerListType* render_surface_layer_list); private: @@ -126,7 +126,7 @@ class CC_EXPORT LayerTreeHostCommon { // given transform. template <typename LayerType> static void ApplySublayerTransformAboutAnchor(const LayerType& layer, - const gfx::Size& bounds, + gfx::Size bounds, gfx::Transform* transform) { if (!layer.sublayer_transform().IsIdentity()) { transform->Translate(layer.anchor_point().x() * bounds.width(), @@ -227,7 +227,7 @@ LayerTreeHostCommon::CalcDrawPropsInputsForTesting<LayerType, RenderSurfaceLayerListType>:: CalcDrawPropsInputsForTesting( LayerType* root_layer, - const gfx::Size& device_viewport_size, + gfx::Size device_viewport_size, const gfx::Transform& device_transform, RenderSurfaceLayerListType* render_surface_layer_list) : CalcDrawPropsInputs<LayerType, RenderSurfaceLayerListType>( @@ -251,7 +251,7 @@ LayerTreeHostCommon::CalcDrawPropsInputsForTesting<LayerType, RenderSurfaceLayerListType>:: CalcDrawPropsInputsForTesting( LayerType* root_layer, - const gfx::Size& device_viewport_size, + gfx::Size device_viewport_size, RenderSurfaceLayerListType* render_surface_layer_list) : CalcDrawPropsInputs<LayerType, RenderSurfaceLayerListType>( root_layer, diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc index 3a71b3d..f7db3e1 100644 --- a/cc/trees/layer_tree_host_common_unittest.cc +++ b/cc/trees/layer_tree_host_common_unittest.cc @@ -44,7 +44,7 @@ class LayerTreeHostCommonTestBase { const gfx::Transform& sublayer_transform, const gfx::PointF& anchor, const gfx::PointF& position, - const gfx::Size& bounds, + gfx::Size bounds, bool preserves3d) { layer->SetTransform(transform); layer->SetSublayerTransform(sublayer_transform); @@ -59,7 +59,7 @@ class LayerTreeHostCommonTestBase { const gfx::Transform& sublayer_transform, const gfx::PointF& anchor, const gfx::PointF& position, - const gfx::Size& bounds, + gfx::Size bounds, bool preserves3d) { SetLayerPropertiesForTestingInternal<Layer>(layer, transform, @@ -75,7 +75,7 @@ class LayerTreeHostCommonTestBase { const gfx::Transform& sublayer_transform, const gfx::PointF& anchor, const gfx::PointF& position, - const gfx::Size& bounds, + gfx::Size bounds, bool preserves3d) { SetLayerPropertiesForTestingInternal<LayerImpl>(layer, transform, diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index 146c0e0..9063caf 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -1899,7 +1899,7 @@ void LayerTreeHostImpl::ReleaseGL() { client_->SetNeedsCommitOnImplThread(); } -void LayerTreeHostImpl::SetViewportSize(const gfx::Size& device_viewport_size) { +void LayerTreeHostImpl::SetViewportSize(gfx::Size device_viewport_size) { if (device_viewport_size == device_viewport_size_) return; @@ -1925,7 +1925,7 @@ void LayerTreeHostImpl::SetOverdrawBottomHeight(float overdraw_bottom_height) { void LayerTreeHostImpl::SetOverhangUIResource( UIResourceId overhang_ui_resource_id, - const gfx::Size& overhang_ui_resource_size) { + gfx::Size overhang_ui_resource_size) { overhang_ui_resource_id_ = overhang_ui_resource_id; overhang_ui_resource_size_ = overhang_ui_resource_size; } diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h index 3b8e65b..2b85e32 100644 --- a/cc/trees/layer_tree_host_impl.h +++ b/cc/trees/layer_tree_host_impl.h @@ -297,13 +297,13 @@ class CC_EXPORT LayerTreeHostImpl size_t memory_allocation_limit_bytes() const; int memory_allocation_priority_cutoff() const; - void SetViewportSize(const gfx::Size& device_viewport_size); + void SetViewportSize(gfx::Size device_viewport_size); void SetOverdrawBottomHeight(float overdraw_bottom_height); float overdraw_bottom_height() const { return overdraw_bottom_height_; } void SetOverhangUIResource(UIResourceId overhang_ui_resource_id, - const gfx::Size& overhang_ui_resource_size); + gfx::Size overhang_ui_resource_size); void SetDeviceScaleFactor(float device_scale_factor); float device_scale_factor() const { return device_scale_factor_; } diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index 6825599..4797541 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -204,7 +204,7 @@ class LayerTreeHostImplTest : public testing::Test, } LayerImpl* CreateScrollAndContentsLayers(LayerTreeImpl* layer_tree_impl, - const gfx::Size& content_size) { + gfx::Size content_size) { scoped_ptr<LayerImpl> root = LayerImpl::Create(layer_tree_impl, 1); root->SetBounds(content_size); @@ -239,14 +239,14 @@ class LayerTreeHostImplTest : public testing::Test, return scroll_layer; } - LayerImpl* SetupScrollAndContentsLayers(const gfx::Size& content_size) { + LayerImpl* SetupScrollAndContentsLayers(gfx::Size content_size) { LayerImpl* scroll_layer = CreateScrollAndContentsLayers( host_impl_->active_tree(), content_size); host_impl_->active_tree()->DidBecomeActive(); return scroll_layer; } - scoped_ptr<LayerImpl> CreateScrollableLayer(int id, const gfx::Size& size) { + scoped_ptr<LayerImpl> CreateScrollableLayer(int id, gfx::Size size) { scoped_ptr<LayerImpl> layer = LayerImpl::Create(host_impl_->active_tree(), id); layer->SetScrollable(true); @@ -3169,7 +3169,7 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { void set_gutter_quad_material(DrawQuad::Material material) { gutter_quad_material_ = material; } - void set_gutter_texture_size(const gfx::Size& gutter_texture_size) { + void set_gutter_texture_size(gfx::Size gutter_texture_size) { gutter_texture_size_ = gutter_texture_size; } @@ -3207,7 +3207,7 @@ class LayerTreeHostImplViewportCoveredTest : public LayerTreeHostImplTest { } } - gfx::Size DipSizeToPixelSize(const gfx::Size& size) { + gfx::Size DipSizeToPixelSize(gfx::Size size) { return gfx::ToRoundedSize( gfx::ScaleSize(size, host_impl_->device_scale_factor())); } diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index dd241af..5737b42 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc @@ -1594,7 +1594,7 @@ static void SetLayerPropertiesForTesting(Layer* layer, const gfx::Transform& transform, const gfx::PointF& anchor, const gfx::PointF& position, - const gfx::Size& bounds, + gfx::Size bounds, bool opaque) { layer->RemoveAllChildren(); if (parent) diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc index 491b42f1..a5f1b32 100644 --- a/cc/trees/layer_tree_host_unittest_occlusion.cc +++ b/cc/trees/layer_tree_host_unittest_occlusion.cc @@ -87,7 +87,7 @@ class LayerTreeHostOcclusionTest : public LayerTreeTest { TestLayer* parent, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds, + gfx::Size bounds, bool opaque) const { layer->RemoveAllChildren(); if (parent) diff --git a/cc/trees/occlusion_tracker.h b/cc/trees/occlusion_tracker.h index 2fe54d0..85334bc 100644 --- a/cc/trees/occlusion_tracker.h +++ b/cc/trees/occlusion_tracker.h @@ -82,7 +82,7 @@ class CC_EXPORT OcclusionTrackerBase { stack_.back().occlusion_from_inside_target); } - void set_minimum_tracking_size(const gfx::Size& size) { + void set_minimum_tracking_size(gfx::Size size) { minimum_tracking_size_ = size; } diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc index 9c6fa45..6b66c28 100644 --- a/cc/trees/occlusion_tracker_unittest.cc +++ b/cc/trees/occlusion_tracker_unittest.cc @@ -201,7 +201,7 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { typename Types::ContentLayerType* CreateRoot(const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds) { + gfx::Size bounds) { typename Types::ContentLayerPtrType layer( Types::CreateContentLayer(GetHost())); typename Types::ContentLayerType* layer_ptr = layer.get(); @@ -218,7 +218,7 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { typename Types::LayerType* CreateLayer(typename Types::LayerType* parent, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds) { + gfx::Size bounds) { typename Types::LayerPtrType layer(Types::CreateLayer(GetHost())); typename Types::LayerType* layer_ptr = layer.get(); SetProperties(layer_ptr, transform, position, bounds); @@ -229,7 +229,7 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { typename Types::LayerType* CreateSurface(typename Types::LayerType* parent, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds) { + gfx::Size bounds) { typename Types::LayerType* layer = CreateLayer(parent, transform, position, bounds); layer->SetForceRenderSurface(true); @@ -240,7 +240,7 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { typename Types::LayerType* parent, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds, + gfx::Size bounds, bool opaque) { typename Types::ContentLayerPtrType layer( Types::CreateContentLayer(GetHost())); @@ -265,7 +265,7 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { typename Types::LayerType* owning_layer, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds) { + gfx::Size bounds) { typename Types::ContentLayerPtrType layer( Types::CreateContentLayer(GetHost())); typename Types::ContentLayerType* layer_ptr = layer.get(); @@ -276,7 +276,7 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { typename Types::LayerType* CreateMaskLayer( typename Types::LayerType* owning_layer, - const gfx::Size& bounds) { + gfx::Size bounds) { typename Types::ContentLayerPtrType layer( Types::CreateContentLayer(GetHost())); typename Types::ContentLayerType* layer_ptr = layer.get(); @@ -289,7 +289,7 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { typename Types::LayerType* parent, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds, + gfx::Size bounds, bool opaque) { typename Types::ContentLayerType* layer = CreateDrawingLayer(parent, transform, position, bounds, opaque); @@ -414,7 +414,7 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { void SetBaseProperties(typename Types::LayerType* layer, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds) { + gfx::Size bounds) { layer->SetTransform(transform); layer->SetSublayerTransform(gfx::Transform()); layer->SetAnchorPoint(gfx::PointF()); @@ -425,14 +425,14 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test { void SetProperties(Layer* layer, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds) { + gfx::Size bounds) { SetBaseProperties(layer, transform, position, bounds); } void SetProperties(LayerImpl* layer, const gfx::Transform& transform, const gfx::PointF& position, - const gfx::Size& bounds) { + gfx::Size bounds) { SetBaseProperties(layer, transform, position, bounds); layer->SetContentBounds(layer->bounds()); |