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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h

Issue 2462803002: Plumb color space to DecodingImageGenerator and ImageFrameGenerator (Closed)
Patch Set: Incorporate review feedback Created 4 years, 1 month 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ~DeferredImageDecoder(); 61 ~DeferredImageDecoder();
62 62
63 String filenameExtension() const; 63 String filenameExtension() const;
64 64
65 sk_sp<SkImage> createFrameAtIndex(size_t); 65 sk_sp<SkImage> createFrameAtIndex(size_t);
66 66
67 PassRefPtr<SharedBuffer> data(); 67 PassRefPtr<SharedBuffer> data();
68 void setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); 68 void setData(PassRefPtr<SharedBuffer> data, bool allDataReceived);
69 69
70 bool isSizeAvailable(); 70 bool isSizeAvailable();
71 bool hasColorSpace() const; 71 bool hasEmbeddedColorSpace() const;
72 IntSize size() const; 72 IntSize size() const;
73 IntSize frameSizeAtIndex(size_t index) const; 73 IntSize frameSizeAtIndex(size_t index) const;
74 size_t frameCount(); 74 size_t frameCount();
75 int repetitionCount() const; 75 int repetitionCount() const;
76 size_t clearCacheExceptFrame(size_t index); 76 size_t clearCacheExceptFrame(size_t index);
77 bool frameHasAlphaAtIndex(size_t index) const; 77 bool frameHasAlphaAtIndex(size_t index) const;
78 bool frameIsCompleteAtIndex(size_t index) const; 78 bool frameIsCompleteAtIndex(size_t index) const;
79 float frameDurationAtIndex(size_t index) const; 79 float frameDurationAtIndex(size_t index) const;
80 size_t frameBytesAtIndex(size_t index) const; 80 size_t frameBytesAtIndex(size_t index) const;
81 ImageOrientation orientationAtIndex(size_t index) const; 81 ImageOrientation orientationAtIndex(size_t index) const;
(...skipping 16 matching lines...) Expand all
98 98
99 // Copy of the data that is passed in, used by deferred decoding. 99 // Copy of the data that is passed in, used by deferred decoding.
100 // Allows creating readonly snapshots that may be read in another thread. 100 // Allows creating readonly snapshots that may be read in another thread.
101 std::unique_ptr<SkRWBuffer> m_rwBuffer; 101 std::unique_ptr<SkRWBuffer> m_rwBuffer;
102 bool m_allDataReceived; 102 bool m_allDataReceived;
103 std::unique_ptr<ImageDecoder> m_actualDecoder; 103 std::unique_ptr<ImageDecoder> m_actualDecoder;
104 104
105 String m_filenameExtension; 105 String m_filenameExtension;
106 IntSize m_size; 106 IntSize m_size;
107 int m_repetitionCount; 107 int m_repetitionCount;
108 bool m_hasColorSpace; 108 bool m_hasEmbeddedColorSpace = false;
109 bool m_canYUVDecode; 109 bool m_canYUVDecode;
110 bool m_hasHotSpot; 110 bool m_hasHotSpot;
111 IntPoint m_hotSpot; 111 IntPoint m_hotSpot;
112 112
113 // Caches frame state information. 113 // Caches frame state information.
114 Vector<DeferredFrameData> m_frameData; 114 Vector<DeferredFrameData> m_frameData;
115 RefPtr<ImageFrameGenerator> m_frameGenerator; 115 RefPtr<ImageFrameGenerator> m_frameGenerator;
116 }; 116 };
117 117
118 } // namespace blink 118 } // namespace blink
119 119
120 #endif 120 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698