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

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

Issue 2743363006: Clean up cc/paint interfaces (Closed)
Patch Set: Rebase Created 3 years, 9 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 /* 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 if (orientation.usesWidthAsHeight()) { 291 if (orientation.usesWidthAsHeight()) {
292 // The destination rect will have its width and height already reversed 292 // The destination rect will have its width and height already reversed
293 // for the orientation of the image, as it was needed for page layout, so 293 // for the orientation of the image, as it was needed for page layout, so
294 // we need to reverse it back here. 294 // we need to reverse it back here.
295 adjustedDstRect = 295 adjustedDstRect =
296 FloatRect(adjustedDstRect.x(), adjustedDstRect.y(), 296 FloatRect(adjustedDstRect.x(), adjustedDstRect.y(),
297 adjustedDstRect.height(), adjustedDstRect.width()); 297 adjustedDstRect.height(), adjustedDstRect.width());
298 } 298 }
299 } 299 }
300 300
301 canvas->drawImageRect(image.get(), adjustedSrcRect, adjustedDstRect, &flags, 301 canvas->drawImageRect(image, adjustedSrcRect, adjustedDstRect, &flags,
danakj 2017/03/16 20:06:15 if you grab the lazygen and uniqueid, you could mo
302 WebCoreClampingModeToSkiaRectConstraint(clampMode)); 302 WebCoreClampingModeToSkiaRectConstraint(clampMode));
303 303
304 if (image->isLazyGenerated()) 304 if (image->isLazyGenerated())
305 PlatformInstrumentation::didDrawLazyPixelRef(image->uniqueID()); 305 PlatformInstrumentation::didDrawLazyPixelRef(image->uniqueID());
306 306
307 startAnimation(); 307 startAnimation();
308 } 308 }
309 309
310 size_t BitmapImage::frameCount() { 310 size_t BitmapImage::frameCount() {
311 if (!m_haveFrameCount) { 311 if (!m_haveFrameCount) {
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 getImageObserver()->animationAdvanced(this); 635 getImageObserver()->animationAdvanced(this);
636 636
637 return true; 637 return true;
638 } 638 }
639 639
640 void BitmapImage::notifyObserversOfAnimationAdvance(TimerBase*) { 640 void BitmapImage::notifyObserversOfAnimationAdvance(TimerBase*) {
641 getImageObserver()->animationAdvanced(this); 641 getImageObserver()->animationAdvanced(this);
642 } 642 }
643 643
644 } // namespace blink 644 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698