| 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/scrollbar_layer.h" | 5 #include "cc/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/caching_bitmap_content_layer_updater.h" | 9 #include "cc/caching_bitmap_content_layer_updater.h" |
| 10 #include "cc/layer_painter.h" | 10 #include "cc/layer_painter.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ScrollbarLayer::~ScrollbarLayer() {} | 54 ScrollbarLayer::~ScrollbarLayer() {} |
| 55 | 55 |
| 56 void ScrollbarLayer::SetScrollLayerId(int id) { | 56 void ScrollbarLayer::SetScrollLayerId(int id) { |
| 57 if (id == scroll_layer_id_) | 57 if (id == scroll_layer_id_) |
| 58 return; | 58 return; |
| 59 | 59 |
| 60 scroll_layer_id_ = id; | 60 scroll_layer_id_ = id; |
| 61 SetNeedsFullTreeSync(); | 61 SetNeedsFullTreeSync(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool ScrollbarLayer::DoNotSkipOnZeroOpacity() const { |
| 65 return scroll_layer_id_ == Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID; |
| 66 } |
| 67 |
| 64 WebKit::WebScrollbar::Orientation ScrollbarLayer::Orientation() const { | 68 WebKit::WebScrollbar::Orientation ScrollbarLayer::Orientation() const { |
| 65 return scrollbar_->orientation(); | 69 return scrollbar_->orientation(); |
| 66 } | 70 } |
| 67 | 71 |
| 68 int ScrollbarLayer::MaxTextureSize() { | 72 int ScrollbarLayer::MaxTextureSize() { |
| 69 DCHECK(layer_tree_host()); | 73 DCHECK(layer_tree_host()); |
| 70 return layer_tree_host()->rendererCapabilities().maxTextureSize; | 74 return layer_tree_host()->rendererCapabilities().maxTextureSize; |
| 71 } | 75 } |
| 72 | 76 |
| 73 float ScrollbarLayer::ClampScaleToMaxTextureSize(float scale) { | 77 float ScrollbarLayer::ClampScaleToMaxTextureSize(float scale) { |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 thumb_.get(), | 426 thumb_.get(), |
| 423 origin_thumb_rect, | 427 origin_thumb_rect, |
| 424 queue, | 428 queue, |
| 425 stats); | 429 stats); |
| 426 } | 430 } |
| 427 | 431 |
| 428 dirty_rect_ = gfx::RectF(); | 432 dirty_rect_ = gfx::RectF(); |
| 429 } | 433 } |
| 430 | 434 |
| 431 } // namespace cc | 435 } // namespace cc |
| OLD | NEW |