| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 Optional<IntRect>, | 58 Optional<IntRect>, |
| 59 const ImageBitmapOptions& = ImageBitmapOptions()); | 59 const ImageBitmapOptions& = ImageBitmapOptions()); |
| 60 static ImageBitmap* create(ImageBitmap*, | 60 static ImageBitmap* create(ImageBitmap*, |
| 61 Optional<IntRect>, | 61 Optional<IntRect>, |
| 62 const ImageBitmapOptions& = ImageBitmapOptions()); | 62 const ImageBitmapOptions& = ImageBitmapOptions()); |
| 63 static ImageBitmap* create(PassRefPtr<StaticBitmapImage>); | 63 static ImageBitmap* create(PassRefPtr<StaticBitmapImage>); |
| 64 static ImageBitmap* create(PassRefPtr<StaticBitmapImage>, | 64 static ImageBitmap* create(PassRefPtr<StaticBitmapImage>, |
| 65 Optional<IntRect>, | 65 Optional<IntRect>, |
| 66 const ImageBitmapOptions& = ImageBitmapOptions()); | 66 const ImageBitmapOptions& = ImageBitmapOptions()); |
| 67 // This function is called by structured-cloning an ImageBitmap. | 67 // This function is called by structured-cloning an ImageBitmap. |
| 68 // isImageBitmapPremultiplied indicates whether the original ImageBitmap is pr
emultiplied or not. | 68 // isImageBitmapPremultiplied indicates whether the original ImageBitmap is |
| 69 // isImageBitmapOriginClean indicates whether the original ImageBitmap is orig
in clean or not. | 69 // premultiplied or not. |
| 70 // isImageBitmapOriginClean indicates whether the original ImageBitmap is |
| 71 // origin clean or not. |
| 70 static ImageBitmap* create(const void* pixelData, | 72 static ImageBitmap* create(const void* pixelData, |
| 71 uint32_t width, | 73 uint32_t width, |
| 72 uint32_t height, | 74 uint32_t height, |
| 73 bool isImageBitmapPremultiplied, | 75 bool isImageBitmapPremultiplied, |
| 74 bool isImageBitmapOriginClean); | 76 bool isImageBitmapOriginClean); |
| 75 static sk_sp<SkImage> getSkImageFromDecoder(std::unique_ptr<ImageDecoder>); | 77 static sk_sp<SkImage> getSkImageFromDecoder(std::unique_ptr<ImageDecoder>); |
| 76 static bool isResizeOptionValid(const ImageBitmapOptions&, ExceptionState&); | 78 static bool isResizeOptionValid(const ImageBitmapOptions&, ExceptionState&); |
| 77 static bool isSourceSizeValid(int sourceWidth, | 79 static bool isSourceSizeValid(int sourceWidth, |
| 78 int sourceHeight, | 80 int sourceHeight, |
| 79 ExceptionState&); | 81 ExceptionState&); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 bool isImageBitmapPremultiplied, | 148 bool isImageBitmapPremultiplied, |
| 147 bool isImageBitmapOriginClean); | 149 bool isImageBitmapOriginClean); |
| 148 | 150 |
| 149 RefPtr<StaticBitmapImage> m_image; | 151 RefPtr<StaticBitmapImage> m_image; |
| 150 bool m_isNeutered = false; | 152 bool m_isNeutered = false; |
| 151 }; | 153 }; |
| 152 | 154 |
| 153 } // namespace blink | 155 } // namespace blink |
| 154 | 156 |
| 155 #endif // ImageBitmap_h | 157 #endif // ImageBitmap_h |
| OLD | NEW |