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

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

Issue 336793003: cc: Move CalculateContentsScale from LayerImpl to LayerTreeHostCommon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 6 years, 6 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 | « no previous file | 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 temporary_impl_bounds_.height() - bounds_.height()); 352 temporary_impl_bounds_.height() - bounds_.height());
353 } 353 }
354 354
355 void SetContentBounds(const gfx::Size& content_bounds); 355 void SetContentBounds(const gfx::Size& content_bounds);
356 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } 356 gfx::Size content_bounds() const { return draw_properties_.content_bounds; }
357 357
358 float contents_scale_x() const { return draw_properties_.contents_scale_x; } 358 float contents_scale_x() const { return draw_properties_.contents_scale_x; }
359 float contents_scale_y() const { return draw_properties_.contents_scale_y; } 359 float contents_scale_y() const { return draw_properties_.contents_scale_y; }
360 void SetContentsScale(float contents_scale_x, float contents_scale_y); 360 void SetContentsScale(float contents_scale_x, float contents_scale_y);
361 361
362 virtual void CalculateContentsScale(float ideal_contents_scale,
363 float device_scale_factor,
364 float page_scale_factor,
365 float maximum_animation_contents_scale,
366 bool animating_transform_to_screen,
367 float* contents_scale_x,
368 float* contents_scale_y,
369 gfx::Size* content_bounds);
370
371 void SetScrollOffsetDelegate(ScrollOffsetDelegate* scroll_offset_delegate); 362 void SetScrollOffsetDelegate(ScrollOffsetDelegate* scroll_offset_delegate);
372 bool IsExternalFlingActive() const; 363 bool IsExternalFlingActive() const;
373 364
374 void SetScrollOffset(const gfx::Vector2d& scroll_offset); 365 void SetScrollOffset(const gfx::Vector2d& scroll_offset);
375 void SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset, 366 void SetScrollOffsetAndDelta(const gfx::Vector2d& scroll_offset,
376 const gfx::Vector2dF& scroll_delta); 367 const gfx::Vector2dF& scroll_delta);
377 gfx::Vector2d scroll_offset() const { return scroll_offset_; } 368 gfx::Vector2d scroll_offset() const { return scroll_offset_; }
378 369
379 gfx::Vector2d MaxScrollOffset() const; 370 gfx::Vector2d MaxScrollOffset() const;
380 gfx::Vector2dF ClampScrollToMaxScrollOffset(); 371 gfx::Vector2dF ClampScrollToMaxScrollOffset();
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 DrawProperties<LayerImpl> draw_properties_; 679 DrawProperties<LayerImpl> draw_properties_;
689 680
690 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; 681 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
691 682
692 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 683 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
693 }; 684 };
694 685
695 } // namespace cc 686 } // namespace cc
696 687
697 #endif // CC_LAYERS_LAYER_IMPL_H_ 688 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698