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

Side by Side Diff: cc/layers/layer_impl.h

Issue 132163009: [#6]Pass gfx structs by const ref (gfx::Vector2d) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on TOT Created 6 years, 10 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/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('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 #ifndef CC_LAYERS_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 float page_scale_factor, 355 float page_scale_factor,
356 bool animating_transform_to_screen, 356 bool animating_transform_to_screen,
357 float* contents_scale_x, 357 float* contents_scale_x,
358 float* contents_scale_y, 358 float* contents_scale_y,
359 gfx::Size* content_bounds); 359 gfx::Size* content_bounds);
360 360
361 void SetScrollOffsetDelegate( 361 void SetScrollOffsetDelegate(
362 LayerScrollOffsetDelegate* scroll_offset_delegate); 362 LayerScrollOffsetDelegate* scroll_offset_delegate);
363 bool IsExternalFlingActive() const; 363 bool IsExternalFlingActive() const;
364 364
365 void SetScrollOffset(gfx::Vector2d scroll_offset); 365 void SetScrollOffset(const gfx::Vector2d& scroll_offset);
366 void SetScrollOffsetAndDelta(gfx::Vector2d scroll_offset, 366 void SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset,
367 const gfx::Vector2dF& scroll_delta); 367 const gfx::Vector2dF& scroll_delta);
368 gfx::Vector2d scroll_offset() const { return scroll_offset_; } 368 gfx::Vector2d scroll_offset() const { return scroll_offset_; }
369 369
370 gfx::Vector2d MaxScrollOffset() const; 370 gfx::Vector2d MaxScrollOffset() const;
371 gfx::Vector2dF ClampScrollToMaxScrollOffset(); 371 gfx::Vector2dF ClampScrollToMaxScrollOffset();
372 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer, 372 void SetScrollbarPosition(ScrollbarLayerImplBase* scrollbar_layer,
373 LayerImpl* scrollbar_clip_layer) const; 373 LayerImpl* scrollbar_clip_layer) const;
374
375 void SetScrollDelta(const gfx::Vector2dF& scroll_delta); 374 void SetScrollDelta(const gfx::Vector2dF& scroll_delta);
376 gfx::Vector2dF ScrollDelta() const; 375 gfx::Vector2dF ScrollDelta() const;
377 376
378 gfx::Vector2dF TotalScrollOffset() const; 377 gfx::Vector2dF TotalScrollOffset() const;
379 378
380 void SetSentScrollDelta(gfx::Vector2d sent_scroll_delta); 379 void SetSentScrollDelta(const gfx::Vector2d& sent_scroll_delta);
381 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; } 380 gfx::Vector2d sent_scroll_delta() const { return sent_scroll_delta_; }
382 381
383 // Returns the delta of the scroll that was outside of the bounds of the 382 // Returns the delta of the scroll that was outside of the bounds of the
384 // initial scroll 383 // initial scroll
385 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll); 384 gfx::Vector2dF ScrollBy(const gfx::Vector2dF& scroll);
386 385
387 void SetScrollClipLayer(int scroll_clip_layer_id); 386 void SetScrollClipLayer(int scroll_clip_layer_id);
388 bool scrollable() const { return !!scroll_clip_layer_; } 387 bool scrollable() const { return !!scroll_clip_layer_; }
389 388
390 void set_user_scrollable_horizontal(bool scrollable) { 389 void set_user_scrollable_horizontal(bool scrollable) {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 DrawProperties<LayerImpl> draw_properties_; 663 DrawProperties<LayerImpl> draw_properties_;
665 664
666 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 665 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
667 666
668 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 667 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
669 }; 668 };
670 669
671 } // namespace cc 670 } // namespace cc
672 671
673 #endif // CC_LAYERS_LAYER_IMPL_H_ 672 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698