| OLD | NEW |
| 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 * | 7 * |
| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 size_t decodeFrameCount() override { return m_client->frameCount(); } | 122 size_t decodeFrameCount() override { return m_client->frameCount(); } |
| 123 | 123 |
| 124 void decode(size_t index) override | 124 void decode(size_t index) override |
| 125 { | 125 { |
| 126 m_client->decodeRequested(); | 126 m_client->decodeRequested(); |
| 127 m_frameBufferCache[index].setStatus(m_client->status()); | 127 m_frameBufferCache[index].setStatus(m_client->status()); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void initializeNewFrame(size_t index) override | 130 void initializeNewFrame(size_t index) override |
| 131 { | 131 { |
| 132 m_frameBufferCache[index].setSize(size().width(), size().height()); | 132 m_frameBufferCache[index].setSizeAndColorProfile(size().width(), size().
height(), colorProfile()); |
| 133 m_frameBufferCache[index].setHasAlpha(false); | 133 m_frameBufferCache[index].setHasAlpha(false); |
| 134 } | 134 } |
| 135 | 135 |
| 136 MockImageDecoderClient* m_client; | 136 MockImageDecoderClient* m_client; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 class MockImageDecoderFactory : public ImageDecoderFactory { | 139 class MockImageDecoderFactory : public ImageDecoderFactory { |
| 140 public: | 140 public: |
| 141 static std::unique_ptr<MockImageDecoderFactory> create(MockImageDecoderClien
t* client, const SkISize& decodedSize) | 141 static std::unique_ptr<MockImageDecoderFactory> create(MockImageDecoderClien
t* client, const SkISize& decodedSize) |
| 142 { | 142 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 162 { | 162 { |
| 163 } | 163 } |
| 164 | 164 |
| 165 MockImageDecoderClient* m_client; | 165 MockImageDecoderClient* m_client; |
| 166 IntSize m_decodedSize; | 166 IntSize m_decodedSize; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 } // namespace blink | 169 } // namespace blink |
| 170 | 170 |
| 171 #endif // MockImageDecoder_h | 171 #endif // MockImageDecoder_h |
| OLD | NEW |