| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 PassOwnPtr<uint8_t[]> copyBitmapData(AlphaDisposition alphaOp = DontPremulti
plyAlpha); | 51 PassOwnPtr<uint8_t[]> copyBitmapData(AlphaDisposition alphaOp = DontPremulti
plyAlpha); |
| 52 unsigned long width() const; | 52 unsigned long width() const; |
| 53 unsigned long height() const; | 53 unsigned long height() const; |
| 54 IntSize size() const; | 54 IntSize size() const; |
| 55 | 55 |
| 56 bool isNeutered() const { return m_isNeutered; } | 56 bool isNeutered() const { return m_isNeutered; } |
| 57 bool originClean() const { return m_image->originClean(); } | 57 bool originClean() const { return m_image->originClean(); } |
| 58 bool isPremultiplied() const { return m_image->isPremultiplied(); } | 58 bool isPremultiplied() const { return m_image->isPremultiplied(); } |
| 59 PassRefPtr<StaticBitmapImage> transfer(); | 59 PassRefPtr<StaticBitmapImage> transfer(); |
| 60 void close(); | 60 void close(); |
| 61 bool isTextureBacked() const; |
| 61 | 62 |
| 62 ~ImageBitmap() override; | 63 ~ImageBitmap() override; |
| 63 | 64 |
| 64 // CanvasImageSource implementation | 65 // CanvasImageSource implementation |
| 65 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt, SnapshotReason, const FloatSize&) const override; | 66 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi
nt, SnapshotReason, const FloatSize&) const override; |
| 66 bool wouldTaintOrigin(SecurityOrigin*) const override { return !m_image->ori
ginClean(); } | 67 bool wouldTaintOrigin(SecurityOrigin*) const override { return !m_image->ori
ginClean(); } |
| 67 void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override; | 68 void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override; |
| 68 FloatSize elementSize(const FloatSize&) const override; | 69 FloatSize elementSize(const FloatSize&) const override; |
| 69 bool isImageBitmap() const override { return true; } | 70 bool isImageBitmap() const override { return true; } |
| 70 | 71 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 86 | 87 |
| 87 void parseOptions(const ImageBitmapOptions&, bool&, bool&); | 88 void parseOptions(const ImageBitmapOptions&, bool&, bool&); |
| 88 | 89 |
| 89 RefPtr<StaticBitmapImage> m_image; | 90 RefPtr<StaticBitmapImage> m_image; |
| 90 bool m_isNeutered = false; | 91 bool m_isNeutered = false; |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 } // namespace blink | 94 } // namespace blink |
| 94 | 95 |
| 95 #endif // ImageBitmap_h | 96 #endif // ImageBitmap_h |
| OLD | NEW |