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

Unified Diff: cc/trees/layer_tree_host_common.h

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.h
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index cd30b938b8d7f197c48d593dd6a98631557585c3..57ea16d9edb8f3e736f4fa6a1ee49d815e868cab 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,
- gfx::Size device_viewport_size,
+ const 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,
- gfx::Size device_viewport_size,
+ const gfx::Size& device_viewport_size,
const gfx::Transform& device_transform,
RenderSurfaceLayerListType* render_surface_layer_list);
CalcDrawPropsInputsForTesting(
LayerType* root_layer,
- gfx::Size device_viewport_size,
+ const 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,
- gfx::Size bounds,
+ const 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,
- gfx::Size device_viewport_size,
+ const 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,
- gfx::Size device_viewport_size,
+ const gfx::Size& device_viewport_size,
RenderSurfaceLayerListType* render_surface_layer_list)
: CalcDrawPropsInputs<LayerType, RenderSurfaceLayerListType>(
root_layer,
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698