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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/BitmapImage.cpp

Issue 2447623002: Remove ImageObserver::didDraw() (Closed)
Patch Set: Rebawse Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 adjustedDstRect.height(), adjustedDstRect.width()); 283 adjustedDstRect.height(), adjustedDstRect.width());
284 } 284 }
285 } 285 }
286 286
287 canvas->drawImageRect(image.get(), adjustedSrcRect, adjustedDstRect, &paint, 287 canvas->drawImageRect(image.get(), adjustedSrcRect, adjustedDstRect, &paint,
288 WebCoreClampingModeToSkiaRectConstraint(clampMode)); 288 WebCoreClampingModeToSkiaRectConstraint(clampMode));
289 289
290 if (image->isLazyGenerated()) 290 if (image->isLazyGenerated())
291 PlatformInstrumentation::didDrawLazyPixelRef(image->uniqueID()); 291 PlatformInstrumentation::didDrawLazyPixelRef(image->uniqueID());
292 292
293 if (ImageObserver* observer = getImageObserver())
294 observer->didDraw(this);
295
296 startAnimation(); 293 startAnimation();
297 } 294 }
298 295
299 size_t BitmapImage::frameCount() { 296 size_t BitmapImage::frameCount() {
300 if (!m_haveFrameCount) { 297 if (!m_haveFrameCount) {
301 m_frameCount = m_source.frameCount(); 298 m_frameCount = m_source.frameCount();
302 // If decoder is not initialized yet, m_source.frameCount() returns 0. 299 // If decoder is not initialized yet, m_source.frameCount() returns 0.
303 if (m_frameCount) 300 if (m_frameCount)
304 m_haveFrameCount = true; 301 m_haveFrameCount = true;
305 } 302 }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 getImageObserver()->animationAdvanced(this); 621 getImageObserver()->animationAdvanced(this);
625 622
626 return true; 623 return true;
627 } 624 }
628 625
629 void BitmapImage::notifyObserversOfAnimationAdvance(TimerBase*) { 626 void BitmapImage::notifyObserversOfAnimationAdvance(TimerBase*) {
630 getImageObserver()->animationAdvanced(this); 627 getImageObserver()->animationAdvanced(this);
631 } 628 }
632 629
633 } // namespace blink 630 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698