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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Draw layered images with a recording GraphicContext Created 5 years 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 23 matching lines...) Expand all
34 #include "platform/graphics/ImageFrameGenerator.h" 34 #include "platform/graphics/ImageFrameGenerator.h"
35 #include "platform/image-decoders/ImageDecoder.h" 35 #include "platform/image-decoders/ImageDecoder.h"
36 #include "wtf/Forward.h" 36 #include "wtf/Forward.h"
37 #include "wtf/OwnPtr.h" 37 #include "wtf/OwnPtr.h"
38 #include "wtf/Vector.h" 38 #include "wtf/Vector.h"
39 39
40 class SkImage; 40 class SkImage;
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class ColorSpaceProfile;
44 class ImageFrameGenerator; 45 class ImageFrameGenerator;
45 class SharedBuffer; 46 class SharedBuffer;
46 47
47 class PLATFORM_EXPORT DeferredImageDecoder { 48 class PLATFORM_EXPORT DeferredImageDecoder {
48 WTF_MAKE_NONCOPYABLE(DeferredImageDecoder); 49 WTF_MAKE_NONCOPYABLE(DeferredImageDecoder);
49 public: 50 public:
50 ~DeferredImageDecoder(); 51 ~DeferredImageDecoder();
51 static PassOwnPtr<DeferredImageDecoder> create(const SharedBuffer& data, Ima geDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption); 52 static PassOwnPtr<DeferredImageDecoder> create(const SharedBuffer& data, Ima geDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption);
52 53
53 static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDec oder>); 54 static PassOwnPtr<DeferredImageDecoder> createForTesting(PassOwnPtr<ImageDec oder>);
54 55
55 static void setEnabled(bool); 56 static void setEnabled(bool);
56 static bool enabled(); 57 static bool enabled();
57 58
58 String filenameExtension() const; 59 String filenameExtension() const;
59 60
60 PassRefPtr<SkImage> createFrameAtIndex(size_t); 61 PassRefPtr<SkImage> createFrameAtIndex(size_t);
61 62
62 void setData(SharedBuffer& data, bool allDataReceived); 63 void setData(SharedBuffer& data, bool allDataReceived);
63 64
64 bool isSizeAvailable(); 65 bool isSizeAvailable();
65 bool hasColorProfile() const; 66 bool hasColorProfile() const;
67 PassRefPtr<ColorSpaceProfile> colorProfile() const;
66 IntSize size() const; 68 IntSize size() const;
67 IntSize frameSizeAtIndex(size_t index) const; 69 IntSize frameSizeAtIndex(size_t index) const;
68 size_t frameCount(); 70 size_t frameCount();
69 int repetitionCount() const; 71 int repetitionCount() const;
70 size_t clearCacheExceptFrame(size_t); 72 size_t clearCacheExceptFrame(size_t);
71 bool frameHasAlphaAtIndex(size_t index) const; 73 bool frameHasAlphaAtIndex(size_t index) const;
72 bool frameIsCompleteAtIndex(size_t) const; 74 bool frameIsCompleteAtIndex(size_t) const;
73 float frameDurationAtIndex(size_t) const; 75 float frameDurationAtIndex(size_t) const;
74 size_t frameBytesAtIndex(size_t index) const; 76 size_t frameBytesAtIndex(size_t index) const;
75 ImageOrientation orientationAtIndex(size_t index) const; 77 ImageOrientation orientationAtIndex(size_t index) const;
(...skipping 10 matching lines...) Expand all
86 88
87 RefPtr<SharedBuffer> m_data; 89 RefPtr<SharedBuffer> m_data;
88 bool m_allDataReceived; 90 bool m_allDataReceived;
89 unsigned m_lastDataSize; 91 unsigned m_lastDataSize;
90 OwnPtr<ImageDecoder> m_actualDecoder; 92 OwnPtr<ImageDecoder> m_actualDecoder;
91 93
92 String m_filenameExtension; 94 String m_filenameExtension;
93 IntSize m_size; 95 IntSize m_size;
94 int m_repetitionCount; 96 int m_repetitionCount;
95 bool m_hasColorProfile; 97 bool m_hasColorProfile;
98 RefPtr<ColorSpaceProfile> m_colorProfile;
96 99
97 // Carries only frame state and other information. Does not carry bitmap. 100 // Carries only frame state and other information. Does not carry bitmap.
98 Vector<FrameData> m_frameData; 101 Vector<FrameData> m_frameData;
99 RefPtr<ImageFrameGenerator> m_frameGenerator; 102 RefPtr<ImageFrameGenerator> m_frameGenerator;
100 103
101 static bool s_enabled; 104 static bool s_enabled;
102 }; 105 };
103 106
104 } // namespace blink 107 } // namespace blink
105 108
106 #endif 109 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698