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

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

Issue 2712083002: color: Remove blink pre-conversion code (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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 String BitmapImage::filenameExtension() const { 259 String BitmapImage::filenameExtension() const {
260 return m_source.filenameExtension(); 260 return m_source.filenameExtension();
261 } 261 }
262 262
263 void BitmapImage::draw( 263 void BitmapImage::draw(
264 PaintCanvas* canvas, 264 PaintCanvas* canvas,
265 const PaintFlags& flags, 265 const PaintFlags& flags,
266 const FloatRect& dstRect, 266 const FloatRect& dstRect,
267 const FloatRect& srcRect, 267 const FloatRect& srcRect,
268 RespectImageOrientationEnum shouldRespectImageOrientation, 268 RespectImageOrientationEnum shouldRespectImageOrientation,
269 ImageClampingMode clampMode, 269 ImageClampingMode clampMode) {
270 const ColorBehavior& colorBehavior) {
271 TRACE_EVENT0("skia", "BitmapImage::draw"); 270 TRACE_EVENT0("skia", "BitmapImage::draw");
272 271
273 sk_sp<SkImage> image = imageForCurrentFrame(colorBehavior); 272 sk_sp<SkImage> image =
273 imageForCurrentFrame(ColorBehavior::transformToGlobalTarget());
274 if (!image) 274 if (!image)
275 return; // It's too early and we don't have an image yet. 275 return; // It's too early and we don't have an image yet.
276 276
277 FloatRect adjustedSrcRect = srcRect; 277 FloatRect adjustedSrcRect = srcRect;
278 adjustedSrcRect.intersect(SkRect::Make(image->bounds())); 278 adjustedSrcRect.intersect(SkRect::Make(image->bounds()));
279 279
280 if (adjustedSrcRect.isEmpty() || dstRect.isEmpty()) 280 if (adjustedSrcRect.isEmpty() || dstRect.isEmpty())
281 return; // Nothing to draw. 281 return; // Nothing to draw.
282 282
283 ImageOrientation orientation = DefaultImageOrientation; 283 ImageOrientation orientation = DefaultImageOrientation;
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 getImageObserver()->animationAdvanced(this); 653 getImageObserver()->animationAdvanced(this);
654 654
655 return true; 655 return true;
656 } 656 }
657 657
658 void BitmapImage::notifyObserversOfAnimationAdvance(TimerBase*) { 658 void BitmapImage::notifyObserversOfAnimationAdvance(TimerBase*) {
659 getImageObserver()->animationAdvanced(this); 659 getImageObserver()->animationAdvanced(this);
660 } 660 }
661 661
662 } // namespace blink 662 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698