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

Side by Side Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "cc/animation/layer_animation_controller.h" 9 #include "cc/animation/layer_animation_controller.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 virtual ~LayerWithForcedDrawsContent() {} 189 virtual ~LayerWithForcedDrawsContent() {}
190 }; 190 };
191 191
192 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } 192 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; }
193 193
194 class MockContentLayerClient : public ContentLayerClient { 194 class MockContentLayerClient : public ContentLayerClient {
195 public: 195 public:
196 MockContentLayerClient() {} 196 MockContentLayerClient() {}
197 virtual ~MockContentLayerClient() {} 197 virtual ~MockContentLayerClient() {}
198 virtual void PaintContents(SkCanvas* canvas, 198 virtual void PaintContents(SkCanvas* canvas,
199 gfx::Rect clip, 199 const gfx::Rect& clip,
200 gfx::RectF* opaque) OVERRIDE {} 200 gfx::RectF* opaque) OVERRIDE {}
201 virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} 201 virtual void DidChangeLayerCanUseLCDText() OVERRIDE {}
202 }; 202 };
203 203
204 scoped_refptr<ContentLayer> CreateDrawableContentLayer( 204 scoped_refptr<ContentLayer> CreateDrawableContentLayer(
205 ContentLayerClient* delegate) { 205 ContentLayerClient* delegate) {
206 scoped_refptr<ContentLayer> to_return = ContentLayer::Create(delegate); 206 scoped_refptr<ContentLayer> to_return = ContentLayer::Create(delegate);
207 to_return->SetIsDrawable(true); 207 to_return->SetIsDrawable(true);
208 return to_return; 208 return to_return;
209 } 209 }
(...skipping 9530 matching lines...) Expand 10 before | Expand all | Expand 10 after
9740 fixed_layer->draw_properties().screen_space_transform.To2dTranslation(), 9740 fixed_layer->draw_properties().screen_space_transform.To2dTranslation(),
9741 container_offset); 9741 container_offset);
9742 EXPECT_VECTOR_EQ(scroll_layer->draw_properties() 9742 EXPECT_VECTOR_EQ(scroll_layer->draw_properties()
9743 .screen_space_transform.To2dTranslation(), 9743 .screen_space_transform.To2dTranslation(),
9744 container_offset - rounded_scroll_delta); 9744 container_offset - rounded_scroll_delta);
9745 } 9745 }
9746 } 9746 }
9747 9747
9748 } // namespace 9748 } // namespace
9749 } // namespace cc 9749 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698