| 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 * 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 bool DeferredImageDecoder::s_enabled = true; | 40 bool DeferredImageDecoder::s_enabled = true; |
| 41 | 41 |
| 42 PassOwnPtr<DeferredImageDecoder> DeferredImageDecoder::create(const SharedBuffer
& data, ImageDecoder::AlphaOption alphaOption, ImageDecoder::GammaAndColorProfil
eOption colorOptions) | 42 PassOwnPtr<DeferredImageDecoder> DeferredImageDecoder::create(const SharedBuffer
& data, ImageDecoder::AlphaOption alphaOption, ImageDecoder::GammaAndColorProfil
eOption colorOptions) |
| 43 { | 43 { |
| 44 OwnPtr<ImageDecoder> actualDecoder = ImageDecoder::create(data, alphaOption,
colorOptions); | 44 OwnPtr<ImageDecoder> actualDecoder = ImageDecoder::create(data, alphaOption,
colorOptions); |
| 45 | 45 |
| 46 if (!actualDecoder) | 46 if (!actualDecoder) |
| 47 return nullptr; | 47 return nullptr; |
| 48 | 48 |
| 49 return adoptPtr(new DeferredImageDecoder(actualDecoder.release())); | 49 return adoptPtr(new DeferredImageDecoder(std::move(actualDecoder))); |
| 50 } | 50 } |
| 51 | 51 |
| 52 PassOwnPtr<DeferredImageDecoder> DeferredImageDecoder::createForTesting(PassOwnP
tr<ImageDecoder> actualDecoder) | 52 PassOwnPtr<DeferredImageDecoder> DeferredImageDecoder::createForTesting(PassOwnP
tr<ImageDecoder> actualDecoder) |
| 53 { | 53 { |
| 54 return adoptPtr(new DeferredImageDecoder(std::move(actualDecoder))); | 54 return adoptPtr(new DeferredImageDecoder(std::move(actualDecoder))); |
| 55 } | 55 } |
| 56 | 56 |
| 57 DeferredImageDecoder::DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecode
r) | 57 DeferredImageDecoder::DeferredImageDecoder(PassOwnPtr<ImageDecoder> actualDecode
r) |
| 58 : m_allDataReceived(false) | 58 : m_allDataReceived(false) |
| 59 , m_actualDecoder(std::move(actualDecoder)) | 59 , m_actualDecoder(std::move(actualDecoder)) |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 return image.release(); | 301 return image.release(); |
| 302 } | 302 } |
| 303 | 303 |
| 304 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const | 304 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const |
| 305 { | 305 { |
| 306 // TODO: Implement. | 306 // TODO: Implement. |
| 307 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; | 307 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; |
| 308 } | 308 } |
| 309 | 309 |
| 310 } // namespace blink | 310 } // namespace blink |
| OLD | NEW |