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

Side by Side Diff: Source/platform/graphics/ImageFrameGenerator.h

Issue 688423004: Remove multi-frame image decoder when the image is completely decoded (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Use the given decoder to decode. If a decoder is not given then try to cr eate one. 103 // Use the given decoder to decode. If a decoder is not given then try to cr eate one.
104 // Returns true if decoding was complete. 104 // Returns true if decoding was complete.
105 bool decode(size_t index, ImageDecoder**, SkBitmap*); 105 bool decode(size_t index, ImageDecoder**, SkBitmap*);
106 106
107 SkISize m_fullSize; 107 SkISize m_fullSize;
108 ThreadSafeDataTransport m_data; 108 ThreadSafeDataTransport m_data;
109 bool m_isMultiFrame; 109 bool m_isMultiFrame;
110 bool m_decodeFailedAndEmpty; 110 bool m_decodeFailedAndEmpty;
111 Vector<bool> m_hasAlpha; 111 Vector<bool> m_hasAlpha;
112 int m_decodeCount; 112 int m_decodeCount;
113 Vector<bool> m_frameComplete;
114 size_t m_framesCount;
Alpha Left Google 2014/10/31 17:17:49 I don't think you need this member variable. This
113 OwnPtr<ExternalMemoryAllocator> m_externalAllocator; 115 OwnPtr<ExternalMemoryAllocator> m_externalAllocator;
114 116
115 OwnPtr<ImageDecoderFactory> m_imageDecoderFactory; 117 OwnPtr<ImageDecoderFactory> m_imageDecoderFactory;
116 118
117 // Prevents multiple decode operations on the same data. 119 // Prevents multiple decode operations on the same data.
118 Mutex m_decodeMutex; 120 Mutex m_decodeMutex;
119 121
120 // Protect concurrent access to m_hasAlpha. 122 // Protect concurrent access to m_hasAlpha.
121 Mutex m_alphaMutex; 123 Mutex m_alphaMutex;
122 }; 124 };
123 125
124 } // namespace blink 126 } // namespace blink
125 127
126 #endif 128 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/ImageFrameGenerator.cpp » ('j') | Source/platform/graphics/ImageFrameGenerator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698