| 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/layer_painter.h" | 10 #include "cc/layer_painter.h" |
| 10 #include "cc/layer_tree_host.h" | 11 #include "cc/layer_tree_host.h" |
| 12 #include "cc/prioritized_resource.h" |
| 11 #include "cc/resource_update_queue.h" | 13 #include "cc/resource_update_queue.h" |
| 12 #include "cc/scrollbar_layer_impl.h" | 14 #include "cc/scrollbar_layer_impl.h" |
| 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" |
| 14 #include "ui/gfx/rect_conversions.h" | 16 #include "ui/gfx/rect_conversions.h" |
| 15 | 17 |
| 16 namespace cc { | 18 namespace cc { |
| 17 | 19 |
| 18 scoped_ptr<LayerImpl> ScrollbarLayer::createLayerImpl(LayerTreeImpl* treeImpl) | 20 scoped_ptr<LayerImpl> ScrollbarLayer::createLayerImpl(LayerTreeImpl* treeImpl) |
| 19 { | 21 { |
| 20 return ScrollbarLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>(); | 22 return ScrollbarLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>(); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 // Consider the thumb to be at the origin when painting. | 330 // Consider the thumb to be at the origin when painting. |
| 329 gfx::Rect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); | 331 gfx::Rect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); |
| 330 gfx::Rect originThumbRect = scrollbarLayerRectToContentRect(gfx::Rect(thumbR
ect.size())); | 332 gfx::Rect originThumbRect = scrollbarLayerRectToContentRect(gfx::Rect(thumbR
ect.size())); |
| 331 if (!originThumbRect.IsEmpty()) | 333 if (!originThumbRect.IsEmpty()) |
| 332 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue,
stats); | 334 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue,
stats); |
| 333 | 335 |
| 334 m_dirtyRect = gfx::RectF(); | 336 m_dirtyRect = gfx::RectF(); |
| 335 } | 337 } |
| 336 | 338 |
| 337 } // namespace cc | 339 } // namespace cc |
| OLD | NEW |