| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 { | 280 { |
| 281 const SkISize& decodedSize = m_frameGenerator->getFullSize(); | 281 const SkISize& decodedSize = m_frameGenerator->getFullSize(); |
| 282 ASSERT(decodedSize.width() > 0); | 282 ASSERT(decodedSize.width() > 0); |
| 283 ASSERT(decodedSize.height() > 0); | 283 ASSERT(decodedSize.height() > 0); |
| 284 | 284 |
| 285 DecodingImageGenerator* generator = new DecodingImageGenerator(m_frameGenera
tor, imageInfoFrom(decodedSize, knownToBeOpaque), index); | 285 DecodingImageGenerator* generator = new DecodingImageGenerator(m_frameGenera
tor, imageInfoFrom(decodedSize, knownToBeOpaque), index); |
| 286 RefPtr<SkImage> image = adoptRef(SkImage::NewFromGenerator(generator)); // S
kImage takes ownership of the generator. | 286 RefPtr<SkImage> image = adoptRef(SkImage::NewFromGenerator(generator)); // S
kImage takes ownership of the generator. |
| 287 if (!image) | 287 if (!image) |
| 288 return nullptr; | 288 return nullptr; |
| 289 | 289 |
| 290 generator->setGenerationId(image->uniqueID()); | |
| 291 generator->setCanYUVDecode(m_canYUVDecode); | 290 generator->setCanYUVDecode(m_canYUVDecode); |
| 292 | 291 |
| 293 return image.release(); | 292 return image.release(); |
| 294 } | 293 } |
| 295 | 294 |
| 296 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const | 295 bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const |
| 297 { | 296 { |
| 298 // TODO: Implement. | 297 // TODO: Implement. |
| 299 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; | 298 return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false; |
| 300 } | 299 } |
| 301 | 300 |
| 302 } // namespace blink | 301 } // namespace blink |
| OLD | NEW |