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

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

Issue 2173873003: Cancel image loads if decoding failed (attempt #2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UAF Created 4 years, 4 months 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 29 matching lines...) Expand all
40 namespace blink { 40 namespace blink {
41 41
42 class ImageFrameGenerator; 42 class ImageFrameGenerator;
43 class SharedBuffer; 43 class SharedBuffer;
44 struct DeferredFrameData; 44 struct DeferredFrameData;
45 45
46 class PLATFORM_EXPORT DeferredImageDecoder final { 46 class PLATFORM_EXPORT DeferredImageDecoder final {
47 WTF_MAKE_NONCOPYABLE(DeferredImageDecoder); 47 WTF_MAKE_NONCOPYABLE(DeferredImageDecoder);
48 USING_FAST_MALLOC(DeferredImageDecoder); 48 USING_FAST_MALLOC(DeferredImageDecoder);
49 public: 49 public:
50 static std::unique_ptr<DeferredImageDecoder> create(const SharedBuffer& data , ImageDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption); 50 static std::unique_ptr<DeferredImageDecoder> create(ImageDecoder::SniffResul t, ImageDecoder::AlphaOption, ImageDecoder::GammaAndColorProfileOption);
51 51
52 static std::unique_ptr<DeferredImageDecoder> createForTesting(std::unique_pt r<ImageDecoder>); 52 static std::unique_ptr<DeferredImageDecoder> createForTesting(std::unique_pt r<ImageDecoder>);
53 53
54 ~DeferredImageDecoder(); 54 ~DeferredImageDecoder();
55 55
56 String filenameExtension() const; 56 String filenameExtension() const;
57 57
58 PassRefPtr<SkImage> createFrameAtIndex(size_t); 58 PassRefPtr<SkImage> createFrameAtIndex(size_t);
59 59
60 PassRefPtr<SharedBuffer> data(); 60 PassRefPtr<SharedBuffer> data();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 IntPoint m_hotSpot; 100 IntPoint m_hotSpot;
101 101
102 // Caches frame state information. 102 // Caches frame state information.
103 Vector<DeferredFrameData> m_frameData; 103 Vector<DeferredFrameData> m_frameData;
104 RefPtr<ImageFrameGenerator> m_frameGenerator; 104 RefPtr<ImageFrameGenerator> m_frameGenerator;
105 }; 105 };
106 106
107 } // namespace blink 107 } // namespace blink
108 108
109 #endif 109 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698