OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ImageBitmap_h | 5 #ifndef ImageBitmap_h |
6 #define ImageBitmap_h | 6 #define ImageBitmap_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "core/html/HTMLImageElement.h" | 10 #include "core/html/HTMLImageElement.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 unsigned long height() const; | 41 unsigned long height() const; |
42 IntSize size() const; | 42 IntSize size() const; |
43 | 43 |
44 bool isNeutered() const { return m_isNeutered; } | 44 bool isNeutered() const { return m_isNeutered; } |
45 bool originClean() const { return m_image->originClean(); } | 45 bool originClean() const { return m_image->originClean(); } |
46 PassRefPtr<StaticBitmapImage> transfer(); | 46 PassRefPtr<StaticBitmapImage> transfer(); |
47 | 47 |
48 ~ImageBitmap() override; | 48 ~ImageBitmap() override; |
49 | 49 |
50 // CanvasImageSource implementation | 50 // CanvasImageSource implementation |
51 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt) const override; | 51 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt, SnapshotReason) const override; |
52 bool wouldTaintOrigin(SecurityOrigin*) const override { return !m_image->ori
ginClean(); } | 52 bool wouldTaintOrigin(SecurityOrigin*) const override { return !m_image->ori
ginClean(); } |
53 void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override; | 53 void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override; |
54 FloatSize elementSize() const override; | 54 FloatSize elementSize() const override; |
55 | 55 |
56 // ImageBitmapSource implementation | 56 // ImageBitmapSource implementation |
57 IntSize bitmapSourceSize() const override { return size(); } | 57 IntSize bitmapSourceSize() const override { return size(); } |
58 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy,
int sw, int sh, ExceptionState&) override; | 58 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy,
int sw, int sh, ExceptionState&) override; |
59 | 59 |
60 DECLARE_VIRTUAL_TRACE(); | 60 DECLARE_VIRTUAL_TRACE(); |
61 | 61 |
(...skipping 10 matching lines...) Expand all Loading... |
72 void notifyImageSourceChanged() override; | 72 void notifyImageSourceChanged() override; |
73 bool requestsHighLiveResourceCachePriority() override { return true; } | 73 bool requestsHighLiveResourceCachePriority() override { return true; } |
74 | 74 |
75 RefPtr<StaticBitmapImage> m_image; | 75 RefPtr<StaticBitmapImage> m_image; |
76 bool m_isNeutered = false; | 76 bool m_isNeutered = false; |
77 }; | 77 }; |
78 | 78 |
79 } // namespace blink | 79 } // namespace blink |
80 | 80 |
81 #endif // ImageBitmap_h | 81 #endif // ImageBitmap_h |
OLD | NEW |