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

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

Issue 2939243002: cc/blink: Veto checker-imaging for multipart image resources. (Closed)
Patch Set: tested Created 3 years, 6 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return BitmapImage::Create(); 52 return BitmapImage::Create();
53 } 53 }
54 54
55 RefPtr<BitmapImage> result = AdoptRef(new BitmapImage(bitmap)); 55 RefPtr<BitmapImage> result = AdoptRef(new BitmapImage(bitmap));
56 result->frames_[0].orientation_ = orientation; 56 result->frames_[0].orientation_ = orientation;
57 if (orientation.UsesWidthAsHeight()) 57 if (orientation.UsesWidthAsHeight())
58 result->size_respecting_orientation_ = result->size_.TransposedSize(); 58 result->size_respecting_orientation_ = result->size_.TransposedSize();
59 return result.Release(); 59 return result.Release();
60 } 60 }
61 61
62 BitmapImage::BitmapImage(ImageObserver* observer) 62 BitmapImage::BitmapImage(ImageObserver* observer, bool is_multipart)
63 : Image(observer), 63 : Image(observer, is_multipart),
64 current_frame_(0), 64 current_frame_(0),
65 cached_frame_index_(0), 65 cached_frame_index_(0),
66 animation_policy_(kImageAnimationPolicyAllowed), 66 animation_policy_(kImageAnimationPolicyAllowed),
67 animation_finished_(false), 67 animation_finished_(false),
68 all_data_received_(false), 68 all_data_received_(false),
69 have_size_(false), 69 have_size_(false),
70 size_available_(false), 70 size_available_(false),
71 have_frame_count_(false), 71 have_frame_count_(false),
72 repetition_count_status_(kUnknown), 72 repetition_count_status_(kUnknown),
73 repetition_count_(kAnimationNone), 73 repetition_count_(kAnimationNone),
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 643
644 return true; 644 return true;
645 } 645 }
646 646
647 void BitmapImage::NotifyObserversOfAnimationAdvance(TimerBase*) { 647 void BitmapImage::NotifyObserversOfAnimationAdvance(TimerBase*) {
648 if (GetImageObserver()) 648 if (GetImageObserver())
649 GetImageObserver()->AnimationAdvanced(this); 649 GetImageObserver()->AnimationAdvanced(this);
650 } 650 }
651 651
652 } // namespace blink 652 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/BitmapImage.h ('k') | third_party/WebKit/Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698