| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 TextureUploader::Parameters upload = { texture, rect, destOffset }; | 243 TextureUploader::Parameters upload = { texture, rect, destOffset }; |
| 244 queue.appendFullUpload(upload); | 244 queue.appendFullUpload(upload); |
| 245 } | 245 } |
| 246 | 246 |
| 247 | 247 |
| 248 void ScrollbarLayerChromium::setTexturePriorities(const CCPriorityCalculator&) | 248 void ScrollbarLayerChromium::setTexturePriorities(const CCPriorityCalculator&) |
| 249 { | 249 { |
| 250 if (contentBounds().isEmpty()) | 250 if (contentBounds().isEmpty()) |
| 251 return; | 251 return; |
| 252 | 252 |
| 253 if (!m_updateRect.isEmpty() /* && ubercomp */) { |
| 254 m_backTrack.clear(); |
| 255 m_foreTrack.clear(); |
| 256 m_thumb.clear(); |
| 257 } |
| 253 createTextureUpdaterIfNeeded(); | 258 createTextureUpdaterIfNeeded(); |
| 254 | 259 |
| 255 bool drawsToRoot = !renderTarget()->parent(); | 260 bool drawsToRoot = !renderTarget()->parent(); |
| 256 if (m_backTrack) { | 261 if (m_backTrack) { |
| 257 m_backTrack->texture()->setDimensions(contentBounds(), m_textureFormat); | 262 m_backTrack->texture()->setDimensions(contentBounds(), m_textureFormat); |
| 258 m_backTrack->texture()->setRequestPriority(CCPriorityCalculator::uiPrior
ity(drawsToRoot)); | 263 m_backTrack->texture()->setRequestPriority(CCPriorityCalculator::uiPrior
ity(drawsToRoot)); |
| 259 } | 264 } |
| 260 if (m_foreTrack) { | 265 if (m_foreTrack) { |
| 261 m_foreTrack->texture()->setDimensions(contentBounds(), m_textureFormat); | 266 m_foreTrack->texture()->setDimensions(contentBounds(), m_textureFormat); |
| 262 m_foreTrack->texture()->setRequestPriority(CCPriorityCalculator::uiPrior
ity(drawsToRoot)); | 267 m_foreTrack->texture()->setRequestPriority(CCPriorityCalculator::uiPrior
ity(drawsToRoot)); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 283 | 288 |
| 284 // Consider the thumb to be at the origin when painting. | 289 // Consider the thumb to be at the origin when painting. |
| 285 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); | 290 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); |
| 286 IntRect originThumbRect = layerRectToContentRect(WebKit::WebRect(0, 0, thumb
Rect.width, thumbRect.height)); | 291 IntRect originThumbRect = layerRectToContentRect(WebKit::WebRect(0, 0, thumb
Rect.width, thumbRect.height)); |
| 287 if (!originThumbRect.isEmpty()) | 292 if (!originThumbRect.isEmpty()) |
| 288 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue,
stats); | 293 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue,
stats); |
| 289 } | 294 } |
| 290 | 295 |
| 291 } | 296 } |
| 292 #endif // USE(ACCELERATED_COMPOSITING) | 297 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |