| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2013 Google Inc. All rights reserved. | 2  * Copyright (C) 2013 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 23 matching lines...) Expand all  Loading... | 
| 34 #include "wtf/Noncopyable.h" | 34 #include "wtf/Noncopyable.h" | 
| 35 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" | 
| 36 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" | 
| 37 | 37 | 
| 38 class SkData; | 38 class SkData; | 
| 39 | 39 | 
| 40 namespace blink { | 40 namespace blink { | 
| 41 | 41 | 
| 42 class ImageFrameGenerator; | 42 class ImageFrameGenerator; | 
| 43 | 43 | 
| 44 // Implements SkImageGenerator, used by SkPixelRef to populate a discardable mem
    ory | 44 // Implements SkImageGenerator, used by SkPixelRef to populate a discardable | 
| 45 // with a decoded image frame. ImageFrameGenerator does the actual decoding. | 45 // memory with a decoded image frame. ImageFrameGenerator does the actual | 
| 46 // | 46 // decoding. | 
| 47 class PLATFORM_EXPORT DecodingImageGenerator final : public SkImageGenerator { | 47 class PLATFORM_EXPORT DecodingImageGenerator final : public SkImageGenerator { | 
| 48   USING_FAST_MALLOC(DecodingImageGenerator); | 48   USING_FAST_MALLOC(DecodingImageGenerator); | 
| 49   WTF_MAKE_NONCOPYABLE(DecodingImageGenerator); | 49   WTF_MAKE_NONCOPYABLE(DecodingImageGenerator); | 
| 50 | 50 | 
| 51  public: | 51  public: | 
| 52   // Make SkImageGenerator::kNeedNewImageUniqueID accessible. | 52   // Make SkImageGenerator::kNeedNewImageUniqueID accessible. | 
| 53   enum { kNeedNewImageUniqueID = SkImageGenerator::kNeedNewImageUniqueID }; | 53   enum { kNeedNewImageUniqueID = SkImageGenerator::kNeedNewImageUniqueID }; | 
| 54 | 54 | 
| 55   static SkImageGenerator* create(SkData*); | 55   static SkImageGenerator* create(SkData*); | 
| 56 | 56 | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 81   RefPtr<ImageFrameGenerator> m_frameGenerator; | 81   RefPtr<ImageFrameGenerator> m_frameGenerator; | 
| 82   const RefPtr<SegmentReader> m_data;  // Data source. | 82   const RefPtr<SegmentReader> m_data;  // Data source. | 
| 83   const bool m_allDataReceived; | 83   const bool m_allDataReceived; | 
| 84   const size_t m_frameIndex; | 84   const size_t m_frameIndex; | 
| 85   bool m_canYUVDecode; | 85   bool m_canYUVDecode; | 
| 86 }; | 86 }; | 
| 87 | 87 | 
| 88 }  // namespace blink | 88 }  // namespace blink | 
| 89 | 89 | 
| 90 #endif  // DecodingImageGenerator_h_ | 90 #endif  // DecodingImageGenerator_h_ | 
| OLD | NEW | 
|---|