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

Side by Side Diff: third_party/WebKit/Source/core/frame/ImageBitmap.h

Issue 2035113002: Implement ImageBitmapOptions resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 // 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 int sourceWidth() override { return m_image ? m_image->width() : 0; } 72 int sourceWidth() override { return m_image ? m_image->width() : 0; }
73 int sourceHeight() override { return m_image ? m_image->height() : 0; } 73 int sourceHeight() override { return m_image ? m_image->height() : 0; }
74 74
75 // ImageBitmapSource implementation 75 // ImageBitmapSource implementation
76 IntSize bitmapSourceSize() const override { return size(); } 76 IntSize bitmapSourceSize() const override { return size(); }
77 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, const ImageBitmapOptions&, ExceptionState&) override; 77 ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, const ImageBitmapOptions&, ExceptionState&) override;
78 78
79 DECLARE_VIRTUAL_TRACE(); 79 DECLARE_VIRTUAL_TRACE();
80 80
81 private: 81 private:
82 ImageBitmap(HTMLImageElement*, const IntRect&, Document*, const ImageBitmapO ptions&); 82 ImageBitmap(HTMLImageElement*, IntRect&, Document*, const ImageBitmapOptions &);
83 ImageBitmap(HTMLVideoElement*, const IntRect&, Document*, const ImageBitmapO ptions&); 83 ImageBitmap(HTMLVideoElement*, IntRect&, Document*, const ImageBitmapOptions &);
84 ImageBitmap(HTMLCanvasElement*, const IntRect&, const ImageBitmapOptions&); 84 ImageBitmap(HTMLCanvasElement*, IntRect&, const ImageBitmapOptions&);
85 ImageBitmap(ImageData*, const IntRect&, const ImageBitmapOptions&, const boo l&, const bool&); 85 ImageBitmap(ImageData*, IntRect&, const ImageBitmapOptions&, const bool&, co nst bool&);
86 ImageBitmap(ImageBitmap*, const IntRect&, const ImageBitmapOptions&); 86 ImageBitmap(ImageBitmap*, IntRect&, const ImageBitmapOptions&);
87 ImageBitmap(PassRefPtr<StaticBitmapImage>); 87 ImageBitmap(PassRefPtr<StaticBitmapImage>);
88 ImageBitmap(PassRefPtr<StaticBitmapImage>, const IntRect&, const ImageBitmap Options&); 88 ImageBitmap(PassRefPtr<StaticBitmapImage>, IntRect&, const ImageBitmapOption s&);
89 ImageBitmap(WebExternalTextureMailbox&); 89 ImageBitmap(WebExternalTextureMailbox&);
90 90
91 void parseOptions(const ImageBitmapOptions&, bool&, bool&); 91 void parseOptions(const ImageBitmapOptions&, bool&, bool&, unsigned&, unsign ed&, SkFilterQuality&);
92 92
93 RefPtr<StaticBitmapImage> m_image; 93 RefPtr<StaticBitmapImage> m_image;
94 bool m_isNeutered = false; 94 bool m_isNeutered = false;
95 }; 95 };
96 96
97 } // namespace blink 97 } // namespace blink
98 98
99 #endif // ImageBitmap_h 99 #endif // ImageBitmap_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698