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

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

Issue 1334703002: NOT FOR LANDING Pass URL to Image::draw (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 bool BitmapImage::hasColorProfile() const 258 bool BitmapImage::hasColorProfile() const
259 { 259 {
260 return m_source.hasColorProfile(); 260 return m_source.hasColorProfile();
261 } 261 }
262 262
263 String BitmapImage::filenameExtension() const 263 String BitmapImage::filenameExtension() const
264 { 264 {
265 return m_source.filenameExtension(); 265 return m_source.filenameExtension();
266 } 266 }
267 267
268 void BitmapImage::draw(SkCanvas* canvas, const SkPaint& paint, const FloatRect& dstRect, const FloatRect& srcRect, RespectImageOrientationEnum shouldRespectImag eOrientation, ImageClampingMode clampMode) 268 void BitmapImage::draw(SkCanvas* canvas, const SkPaint& paint, const FloatRect& dstRect, const FloatRect& srcRect, RespectImageOrientationEnum shouldRespectImag eOrientation, ImageClampingMode clampMode, const KURL&)
269 { 269 {
270 TRACE_EVENT0("skia", "BitmapImage::draw"); 270 TRACE_EVENT0("skia", "BitmapImage::draw");
271 271
272 RefPtr<SkImage> image = imageForCurrentFrame(); 272 RefPtr<SkImage> image = imageForCurrentFrame();
273 if (!image) 273 if (!image)
274 return; // It's too early and we don't have an image yet. 274 return; // It's too early and we don't have an image yet.
275 275
276 FloatRect adjustedSrcRect = srcRect; 276 FloatRect adjustedSrcRect = srcRect;
277 adjustedSrcRect.intersect(FloatRect(0, 0, image->width(), image->height())); 277 adjustedSrcRect.intersect(FloatRect(0, 0, image->width(), image->height()));
278 278
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 destroyDecodedDataIfNecessary(); 663 destroyDecodedDataIfNecessary();
664 664
665 // We need to draw this frame if we advanced to it while not skipping, or if 665 // We need to draw this frame if we advanced to it while not skipping, or if
666 // while trying to skip frames we hit the last frame and thus had to stop. 666 // while trying to skip frames we hit the last frame and thus had to stop.
667 if (skippingFrames != advancedAnimation) 667 if (skippingFrames != advancedAnimation)
668 imageObserver()->animationAdvanced(this); 668 imageObserver()->animationAdvanced(this);
669 return advancedAnimation; 669 return advancedAnimation;
670 } 670 }
671 671
672 } // namespace blink 672 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/BitmapImage.h ('k') | Source/platform/graphics/CrossfadeGeneratedImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698