Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/scrollbar_layer.h" | 5 #include "cc/layers/scrollbar_layer.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/layers/scrollbar_layer_impl.h" | 9 #include "cc/layers/scrollbar_layer_impl.h" |
| 10 #include "cc/resources/caching_bitmap_content_layer_updater.h" | 10 #include "cc/resources/caching_bitmap_content_layer_updater.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 bool animating_transform_to_screen, | 96 bool animating_transform_to_screen, |
| 97 float* contents_scale_x, | 97 float* contents_scale_x, |
| 98 float* contents_scale_y, | 98 float* contents_scale_y, |
| 99 gfx::Size* content_bounds) { | 99 gfx::Size* content_bounds) { |
| 100 ContentsScalingLayer::CalculateContentsScale( | 100 ContentsScalingLayer::CalculateContentsScale( |
| 101 ClampScaleToMaxTextureSize(ideal_contents_scale), | 101 ClampScaleToMaxTextureSize(ideal_contents_scale), |
| 102 animating_transform_to_screen, | 102 animating_transform_to_screen, |
| 103 contents_scale_x, | 103 contents_scale_x, |
| 104 contents_scale_y, | 104 contents_scale_y, |
| 105 content_bounds); | 105 content_bounds); |
| 106 DCHECK_LE(content_bounds->width(), MaxTextureSize()); | |
| 107 DCHECK_LE(content_bounds->height(), MaxTextureSize()); | |
|
jamesr
2013/03/25 21:45:36
Can you leave these DCHECKs enabled when not in so
| |
| 108 } | 106 } |
| 109 | 107 |
| 110 void ScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { | 108 void ScrollbarLayer::PushPropertiesTo(LayerImpl* layer) { |
| 111 ContentsScalingLayer::PushPropertiesTo(layer); | 109 ContentsScalingLayer::PushPropertiesTo(layer); |
| 112 | 110 |
| 113 ScrollbarLayerImpl* scrollbar_layer = static_cast<ScrollbarLayerImpl*>(layer); | 111 ScrollbarLayerImpl* scrollbar_layer = static_cast<ScrollbarLayerImpl*>(layer); |
| 114 | 112 |
| 115 scrollbar_layer->SetScrollbarData(scrollbar_.get()); | 113 scrollbar_layer->SetScrollbarData(scrollbar_.get()); |
| 116 scrollbar_layer->SetThumbSize(thumb_size_); | 114 scrollbar_layer->SetThumbSize(thumb_size_); |
| 117 | 115 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 432 thumb_.get(), | 430 thumb_.get(), |
| 433 origin_thumb_rect, | 431 origin_thumb_rect, |
| 434 queue, | 432 queue, |
| 435 stats); | 433 stats); |
| 436 } | 434 } |
| 437 | 435 |
| 438 dirty_rect_ = gfx::RectF(); | 436 dirty_rect_ = gfx::RectF(); |
| 439 } | 437 } |
| 440 | 438 |
| 441 } // namespace cc | 439 } // namespace cc |
| OLD | NEW |