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

Side by Side Diff: cc/ScrollbarLayerChromium.cpp

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void ScrollbarLayerChromium::updatePart(CachingBitmapCanvasLayerTextureUpdater* painter, LayerTextureUpdater::Texture* texture, const IntRect& rect, CCTextureUp dateQueue& queue, CCRenderingStats& stats) 214 void ScrollbarLayerChromium::updatePart(CachingBitmapCanvasLayerTextureUpdater* painter, LayerTextureUpdater::Texture* texture, const IntRect& rect, CCTextureUp dateQueue& queue, CCRenderingStats& stats)
215 { 215 {
216 // Skip painting and uploading if there are no invalidations and 216 // Skip painting and uploading if there are no invalidations and
217 // we already have valid texture data. 217 // we already have valid texture data.
218 if (texture->texture()->haveBackingTexture() 218 if (texture->texture()->haveBackingTexture()
219 && texture->texture()->size() == rect.size() 219 && texture->texture()->size() == rect.size()
220 && m_updateRect.isEmpty()) 220 && m_updateRect.isEmpty())
221 return; 221 return;
222 222
223 // We should always have enough memory for UI. 223 // We should always have enough memory for UI.
224 ASSERT(texture->texture()->canAcquireBackingTexture()); 224 DCHECK(texture->texture()->canAcquireBackingTexture());
225 if (!texture->texture()->canAcquireBackingTexture()) 225 if (!texture->texture()->canAcquireBackingTexture())
226 return; 226 return;
227 227
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");
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 // Consider the thumb to be at the origin when painting. 282 // Consider the thumb to be at the origin when painting.
283 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); 283 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get());
284 IntRect originThumbRect = layerRectToContentRect(WebKit::WebRect(0, 0, thumb Rect.width, thumbRect.height)); 284 IntRect originThumbRect = layerRectToContentRect(WebKit::WebRect(0, 0, thumb Rect.width, thumbRect.height));
285 if (!originThumbRect.isEmpty()) 285 if (!originThumbRect.isEmpty())
286 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue, stats); 286 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue, stats);
287 } 287 }
288 288
289 } 289 }
290 #endif // USE(ACCELERATED_COMPOSITING) 290 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« cc/CCCompletionEvent.h ('K') | « cc/RateLimiter.cpp ('k') | cc/ShaderChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698