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

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

Issue 2636533002: Revert of Implement color management for ImageData
Patch Set: Created 3 years, 11 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"
11 #include "core/html/canvas/CanvasImageSource.h" 11 #include "core/html/canvas/CanvasImageSource.h"
12 #include "core/imagebitmap/ImageBitmapOptions.h" 12 #include "core/imagebitmap/ImageBitmapOptions.h"
13 #include "core/imagebitmap/ImageBitmapSource.h" 13 #include "core/imagebitmap/ImageBitmapSource.h"
14 #include "platform/geometry/IntRect.h" 14 #include "platform/geometry/IntRect.h"
15 #include "platform/graphics/Image.h" 15 #include "platform/graphics/Image.h"
16 #include "platform/graphics/ImageBuffer.h" 16 #include "platform/graphics/ImageBuffer.h"
17 #include "platform/graphics/StaticBitmapImage.h" 17 #include "platform/graphics/StaticBitmapImage.h"
18 #include "platform/heap/Handle.h" 18 #include "platform/heap/Handle.h"
19 #include "third_party/skia/include/core/SkRefCnt.h" 19 #include "third_party/skia/include/core/SkRefCnt.h"
20 #include "wtf/PassRefPtr.h" 20 #include "wtf/PassRefPtr.h"
21 #include <memory> 21 #include <memory>
22 22
23 namespace blink { 23 namespace blink {
24 class Float32ImageData;
25 class HTMLCanvasElement; 24 class HTMLCanvasElement;
26 class HTMLVideoElement; 25 class HTMLVideoElement;
27 class ImageData; 26 class ImageData;
28 class ImageDecoder; 27 class ImageDecoder;
29 class OffscreenCanvas; 28 class OffscreenCanvas;
30 29
31 enum AlphaDisposition { 30 enum AlphaDisposition {
32 PremultiplyAlpha, 31 PremultiplyAlpha,
33 DontPremultiplyAlpha, 32 DontPremultiplyAlpha,
34 }; 33 };
(...skipping 24 matching lines...) Expand all
59 const ImageBitmapOptions& = ImageBitmapOptions()); 58 const ImageBitmapOptions& = ImageBitmapOptions());
60 static ImageBitmap* create(HTMLCanvasElement*, 59 static ImageBitmap* create(HTMLCanvasElement*,
61 Optional<IntRect>, 60 Optional<IntRect>,
62 const ImageBitmapOptions& = ImageBitmapOptions()); 61 const ImageBitmapOptions& = ImageBitmapOptions());
63 static ImageBitmap* create(OffscreenCanvas*, 62 static ImageBitmap* create(OffscreenCanvas*,
64 Optional<IntRect>, 63 Optional<IntRect>,
65 const ImageBitmapOptions& = ImageBitmapOptions()); 64 const ImageBitmapOptions& = ImageBitmapOptions());
66 static ImageBitmap* create(ImageData*, 65 static ImageBitmap* create(ImageData*,
67 Optional<IntRect>, 66 Optional<IntRect>,
68 const ImageBitmapOptions& = ImageBitmapOptions()); 67 const ImageBitmapOptions& = ImageBitmapOptions());
69 static ImageBitmap* create(Float32ImageData*,
70 Optional<IntRect>,
71 const ImageBitmapOptions& = ImageBitmapOptions());
72 static ImageBitmap* create(ImageBitmap*, 68 static ImageBitmap* create(ImageBitmap*,
73 Optional<IntRect>, 69 Optional<IntRect>,
74 const ImageBitmapOptions& = ImageBitmapOptions()); 70 const ImageBitmapOptions& = ImageBitmapOptions());
75 static ImageBitmap* create(PassRefPtr<StaticBitmapImage>); 71 static ImageBitmap* create(PassRefPtr<StaticBitmapImage>);
76 static ImageBitmap* create(PassRefPtr<StaticBitmapImage>, 72 static ImageBitmap* create(PassRefPtr<StaticBitmapImage>,
77 Optional<IntRect>, 73 Optional<IntRect>,
78 const ImageBitmapOptions& = ImageBitmapOptions()); 74 const ImageBitmapOptions& = ImageBitmapOptions());
79 // This function is called by structured-cloning an ImageBitmap. 75 // This function is called by structured-cloning an ImageBitmap.
80 // isImageBitmapPremultiplied indicates whether the original ImageBitmap is 76 // isImageBitmapPremultiplied indicates whether the original ImageBitmap is
81 // premultiplied or not. 77 // premultiplied or not.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 Optional<IntRect>, 143 Optional<IntRect>,
148 Document*, 144 Document*,
149 const ImageBitmapOptions&); 145 const ImageBitmapOptions&);
150 ImageBitmap(HTMLVideoElement*, 146 ImageBitmap(HTMLVideoElement*,
151 Optional<IntRect>, 147 Optional<IntRect>,
152 Document*, 148 Document*,
153 const ImageBitmapOptions&); 149 const ImageBitmapOptions&);
154 ImageBitmap(HTMLCanvasElement*, Optional<IntRect>, const ImageBitmapOptions&); 150 ImageBitmap(HTMLCanvasElement*, Optional<IntRect>, const ImageBitmapOptions&);
155 ImageBitmap(OffscreenCanvas*, Optional<IntRect>, const ImageBitmapOptions&); 151 ImageBitmap(OffscreenCanvas*, Optional<IntRect>, const ImageBitmapOptions&);
156 ImageBitmap(ImageData*, Optional<IntRect>, const ImageBitmapOptions&); 152 ImageBitmap(ImageData*, Optional<IntRect>, const ImageBitmapOptions&);
157 ImageBitmap(Float32ImageData*, Optional<IntRect>, const ImageBitmapOptions&);
158 ImageBitmap(ImageBitmap*, Optional<IntRect>, const ImageBitmapOptions&); 153 ImageBitmap(ImageBitmap*, Optional<IntRect>, const ImageBitmapOptions&);
159 ImageBitmap(PassRefPtr<StaticBitmapImage>); 154 ImageBitmap(PassRefPtr<StaticBitmapImage>);
160 ImageBitmap(PassRefPtr<StaticBitmapImage>, 155 ImageBitmap(PassRefPtr<StaticBitmapImage>,
161 Optional<IntRect>, 156 Optional<IntRect>,
162 const ImageBitmapOptions&); 157 const ImageBitmapOptions&);
163 ImageBitmap(const void* pixelData, 158 ImageBitmap(const void* pixelData,
164 uint32_t width, 159 uint32_t width,
165 uint32_t height, 160 uint32_t height,
166 bool isImageBitmapPremultiplied, 161 bool isImageBitmapPremultiplied,
167 bool isImageBitmapOriginClean); 162 bool isImageBitmapOriginClean);
168 163
169 RefPtr<StaticBitmapImage> m_image; 164 RefPtr<StaticBitmapImage> m_image;
170 bool m_isNeutered = false; 165 bool m_isNeutered = false;
171 }; 166 };
172 167
173 } // namespace blink 168 } // namespace blink
174 169
175 #endif // ImageBitmap_h 170 #endif // ImageBitmap_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMTypedArray.h ('k') | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698