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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

Issue 2879123003: blink: Fix frame completion querying for static images. (Closed)
Patch Set: test Created 3 years, 7 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 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2009-2010. 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 virtual int RepetitionCount() const { return kCAnimationNone; } 186 virtual int RepetitionCount() const { return kCAnimationNone; }
187 187
188 // Decodes as much of the requested frame as possible, and returns an 188 // Decodes as much of the requested frame as possible, and returns an
189 // ImageDecoder-owned pointer. 189 // ImageDecoder-owned pointer.
190 ImageFrame* FrameBufferAtIndex(size_t); 190 ImageFrame* FrameBufferAtIndex(size_t);
191 191
192 // Whether the requested frame has alpha. 192 // Whether the requested frame has alpha.
193 virtual bool FrameHasAlphaAtIndex(size_t) const; 193 virtual bool FrameHasAlphaAtIndex(size_t) const;
194 194
195 // Whether or not the frame is fully received. 195 // Whether or not the frame is fully received.
196 virtual bool FrameIsCompleteAtIndex(size_t) const; 196 virtual bool FrameIsCompleteAtIndex(size_t) const;
scroggo_chromium 2017/05/30 15:51:34 nit: As a follow-on, I think we should rename this
scroggo_chromium 2017/07/17 19:25:35 Uploaded crrev.com/2982083002
197 197
198 // Returns true if a cached complete decode is available.
199 bool FrameIsDecodedAtIndex(size_t) const;
200
198 // Duration for displaying a frame in milliseconds. This method is only used 201 // Duration for displaying a frame in milliseconds. This method is only used
199 // by animated images. 202 // by animated images.
200 virtual float FrameDurationAtIndex(size_t) const { return 0; } 203 virtual float FrameDurationAtIndex(size_t) const { return 0; }
201 204
202 // Number of bytes in the decoded frame. Returns 0 if the decoder doesn't 205 // Number of bytes in the decoded frame. Returns 0 if the decoder doesn't
203 // have this frame cached (either because it hasn't been decoded, or because 206 // have this frame cached (either because it hasn't been decoded, or because
204 // it has been cleared). 207 // it has been cleared).
205 virtual size_t FrameBytesAtIndex(size_t) const; 208 virtual size_t FrameBytesAtIndex(size_t) const;
206 209
207 ImageOrientation Orientation() const { return orientation_; } 210 ImageOrientation Orientation() const { return orientation_; }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 bool has_histogrammed_color_space_ = false; 431 bool has_histogrammed_color_space_ = false;
429 432
430 sk_sp<SkColorSpace> embedded_color_space_ = nullptr; 433 sk_sp<SkColorSpace> embedded_color_space_ = nullptr;
431 bool source_to_target_color_transform_needs_update_ = false; 434 bool source_to_target_color_transform_needs_update_ = false;
432 std::unique_ptr<SkColorSpaceXform> source_to_target_color_transform_; 435 std::unique_ptr<SkColorSpaceXform> source_to_target_color_transform_;
433 }; 436 };
434 437
435 } // namespace blink 438 } // namespace blink
436 439
437 #endif 440 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698