Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: cc/ScrollbarLayerChromium.cpp

Issue 11074009: cc: Remove LayerTextureUpdater::Texture::updateRect() callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and move ClearUploadsToEvictedResources test to CCPrioritizedTextureTest. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Paint and upload the entire part. 228 // Paint and upload the entire part.
229 float widthScale = static_cast<float>(contentBounds().width()) / bounds().wi dth(); 229 float widthScale = static_cast<float>(contentBounds().width()) / bounds().wi dth();
230 float heightScale = static_cast<float>(contentBounds().height()) / bounds(). height(); 230 float heightScale = static_cast<float>(contentBounds().height()) / bounds(). height();
231 IntRect paintedOpaqueRect; 231 IntRect paintedOpaqueRect;
232 painter->prepareToUpdate(rect, rect.size(), widthScale, heightScale, painted OpaqueRect, stats); 232 painter->prepareToUpdate(rect, rect.size(), widthScale, heightScale, painted OpaqueRect, stats);
233 if (!painter->pixelsDidChange() && texture->texture()->haveBackingTexture()) { 233 if (!painter->pixelsDidChange() && texture->texture()->haveBackingTexture()) {
234 TRACE_EVENT_INSTANT0("cc","ScrollbarLayerChromium::updatePart no texture upload needed"); 234 TRACE_EVENT_INSTANT0("cc","ScrollbarLayerChromium::updatePart no texture upload needed");
235 return; 235 return;
236 } 236 }
237 237
238 texture->prepareRect(rect, stats);
239
240 IntSize destOffset(0, 0); 238 IntSize destOffset(0, 0);
241 TextureUploader::Parameters upload = { texture, rect, destOffset }; 239 texture->update(queue, rect, destOffset, false, stats);
242 queue.appendFullUpload(upload);
243 } 240 }
244 241
245 242
246 void ScrollbarLayerChromium::setTexturePriorities(const CCPriorityCalculator&) 243 void ScrollbarLayerChromium::setTexturePriorities(const CCPriorityCalculator&)
247 { 244 {
248 if (contentBounds().isEmpty()) 245 if (contentBounds().isEmpty())
249 return; 246 return;
250 247
251 createTextureUpdaterIfNeeded(); 248 createTextureUpdaterIfNeeded();
252 249
(...skipping 28 matching lines...) Expand all
281 278
282 // Consider the thumb to be at the origin when painting. 279 // Consider the thumb to be at the origin when painting.
283 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); 280 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get());
284 IntRect originThumbRect = layerRectToContentRect(WebKit::WebRect(0, 0, thumb Rect.width, thumbRect.height)); 281 IntRect originThumbRect = layerRectToContentRect(WebKit::WebRect(0, 0, thumb Rect.width, thumbRect.height));
285 if (!originThumbRect.isEmpty()) 282 if (!originThumbRect.isEmpty())
286 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue, stats); 283 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue, stats);
287 } 284 }
288 285
289 } 286 }
290 #endif // USE(ACCELERATED_COMPOSITING) 287 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698