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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
8 | 8 |
9 #include "ScrollbarLayerChromium.h" | 9 #include "ScrollbarLayerChromium.h" |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 { | 38 { |
39 } | 39 } |
40 | 40 |
41 void ScrollbarLayerChromium::pushPropertiesTo(CCLayerImpl* layer) | 41 void ScrollbarLayerChromium::pushPropertiesTo(CCLayerImpl* layer) |
42 { | 42 { |
43 LayerChromium::pushPropertiesTo(layer); | 43 LayerChromium::pushPropertiesTo(layer); |
44 | 44 |
45 CCScrollbarLayerImpl* scrollbarLayer = static_cast<CCScrollbarLayerImpl*>(la
yer); | 45 CCScrollbarLayerImpl* scrollbarLayer = static_cast<CCScrollbarLayerImpl*>(la
yer); |
46 | 46 |
47 if (!scrollbarLayer->scrollbarGeometry()) | 47 if (!scrollbarLayer->scrollbarGeometry()) |
48 scrollbarLayer->setScrollbarGeometry(adoptPtr(m_geometry->clone())); | 48 scrollbarLayer->setScrollbarGeometry(CCScrollbarGeometryFixedThumb::crea
te(adoptPtr(m_geometry->clone()))); |
49 | 49 |
50 scrollbarLayer->setScrollbarData(m_scrollbar.get()); | 50 scrollbarLayer->setScrollbarData(m_scrollbar.get()); |
51 | 51 |
52 if (m_backTrack && m_backTrack->texture()->haveBackingTexture()) | 52 if (m_backTrack && m_backTrack->texture()->haveBackingTexture()) |
53 scrollbarLayer->setBackTrackResourceId(m_backTrack->texture()->resourceI
d()); | 53 scrollbarLayer->setBackTrackResourceId(m_backTrack->texture()->resourceI
d()); |
54 else | 54 else |
55 scrollbarLayer->setBackTrackResourceId(0); | 55 scrollbarLayer->setBackTrackResourceId(0); |
56 | 56 |
57 if (m_foreTrack && m_foreTrack->texture()->haveBackingTexture()) | 57 if (m_foreTrack && m_foreTrack->texture()->haveBackingTexture()) |
58 scrollbarLayer->setForeTrackResourceId(m_foreTrack->texture()->resourceI
d()); | 58 scrollbarLayer->setForeTrackResourceId(m_foreTrack->texture()->resourceI
d()); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 // Consider the thumb to be at the origin when painting. | 253 // Consider the thumb to be at the origin when painting. |
254 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); | 254 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); |
255 IntRect originThumbRect = IntRect(0, 0, thumbRect.width, thumbRect.height); | 255 IntRect originThumbRect = IntRect(0, 0, thumbRect.width, thumbRect.height); |
256 if (!originThumbRect.isEmpty()) | 256 if (!originThumbRect.isEmpty()) |
257 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue,
stats); | 257 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue,
stats); |
258 } | 258 } |
259 | 259 |
260 } | 260 } |
261 #endif // USE(ACCELERATED_COMPOSITING) | 261 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |