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

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

Issue 1409243005: Make ImageBitmap Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix blank line Created 5 years, 1 month 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 23 matching lines...) Expand all
34 34
35 PassRefPtr<Image> bitmapImage() const; 35 PassRefPtr<Image> bitmapImage() const;
36 PassRefPtrWillBeRawPtr<HTMLImageElement> imageElement() const { return m_ima geElement; } 36 PassRefPtrWillBeRawPtr<HTMLImageElement> imageElement() const { return m_ima geElement; }
37 37
38 IntRect bitmapRect() const { return m_bitmapRect; } 38 IntRect bitmapRect() const { return m_bitmapRect; }
39 39
40 int width() const { return m_cropRect.width(); } 40 int width() const { return m_cropRect.width(); }
41 int height() const { return m_cropRect.height(); } 41 int height() const { return m_cropRect.height(); }
42 IntSize size() const { return m_cropRect.size(); } 42 IntSize size() const { return m_cropRect.size(); }
43 43
44 bool isNeutered() const { return m_isNeutered; }
45 void neuter();
46 PassRefPtr<ImageBitmap> transfer();
Justin Novosad 2015/10/23 13:30:04 PassRefPtrWillBeRawPtr
47
44 ~ImageBitmap() override; 48 ~ImageBitmap() override;
45 49
46 // CanvasImageSource implementation 50 // CanvasImageSource implementation
47 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi nt) const override; 51 PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*, AccelerationHi nt) const override;
48 bool wouldTaintOrigin(SecurityOrigin*) const override { return false; } 52 bool wouldTaintOrigin(SecurityOrigin*) const override { return false; }
49 void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override; 53 void adjustDrawRects(FloatRect* srcRect, FloatRect* dstRect) const override;
50 FloatSize elementSize() const override; 54 FloatSize elementSize() const override;
51 55
52 DECLARE_VIRTUAL_TRACE(); 56 DECLARE_VIRTUAL_TRACE();
53 57
(...skipping 15 matching lines...) Expand all
69 RefPtr<Image> m_bitmap; 73 RefPtr<Image> m_bitmap;
70 74
71 IntRect m_bitmapRect; // The rect where the underlying Image should be place d in reference to the ImageBitmap. 75 IntRect m_bitmapRect; // The rect where the underlying Image should be place d in reference to the ImageBitmap.
72 IntRect m_cropRect; 76 IntRect m_cropRect;
73 77
74 // The offset by which the desired Image is stored internally. 78 // The offset by which the desired Image is stored internally.
75 // ImageBitmaps constructed from HTMLImageElements reference the entire Imag eResource and may have a non-zero bitmap offset. 79 // ImageBitmaps constructed from HTMLImageElements reference the entire Imag eResource and may have a non-zero bitmap offset.
76 // ImageBitmaps not constructed from HTMLImageElements always pre-crop and s tore the image at (0, 0). 80 // ImageBitmaps not constructed from HTMLImageElements always pre-crop and s tore the image at (0, 0).
77 IntPoint m_bitmapOffset; 81 IntPoint m_bitmapOffset;
78 82
83 bool m_isNeutered;
Justin Novosad 2015/10/23 13:30:04 Is this field necessary? I think isNeuteres can be
79 }; 84 };
80 85
81 } // namespace blink 86 } // namespace blink
82 87
83 #endif // ImageBitmap_h 88 #endif // ImageBitmap_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698