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

Side by Side Diff: third_party/WebKit/Source/core/html/ImageData.h

Issue 2845193002: Refactor ImageBitmap constructor from ImageData to be color managed
Patch Set: local commit - all working except unpremultiply Created 3 years, 6 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 /* 1 /*
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 int height() const { return size_.Height(); } 127 int height() const { return size_.Height(); }
128 128
129 DOMUint8ClampedArray* data(); 129 DOMUint8ClampedArray* data();
130 const DOMUint8ClampedArray* data() const; 130 const DOMUint8ClampedArray* data() const;
131 ImageDataArray& dataUnion() { return data_union_; } 131 ImageDataArray& dataUnion() { return data_union_; }
132 const ImageDataArray& dataUnion() const { return data_union_; } 132 const ImageDataArray& dataUnion() const { return data_union_; }
133 void dataUnion(ImageDataArray& result) { result = data_union_; }; 133 void dataUnion(ImageDataArray& result) { result = data_union_; };
134 134
135 DOMArrayBufferBase* BufferBase() const; 135 DOMArrayBufferBase* BufferBase() const;
136 136
137 sk_sp<SkColorSpace> GetSkColorSpace(); 137 CanvasColorParams GetCanvasColorParams();
138 bool ImageDataInCanvasColorSettings(const CanvasColorSpace&, 138 bool ImageDataInCanvasColorSettings(const CanvasColorSpace&,
139 const CanvasPixelFormat&, 139 const CanvasPixelFormat&,
140 std::unique_ptr<uint8_t[]>&); 140 std::unique_ptr<uint8_t[]>&);
141 bool ImageDataInCanvasColorSettings(const CanvasColorParams&,
142 std::unique_ptr<uint8_t[]>&);
141 143
142 // ImageBitmapSource implementation 144 // ImageBitmapSource implementation
143 IntSize BitmapSourceSize() const override { return size_; } 145 IntSize BitmapSourceSize() const override { return size_; }
144 ScriptPromise CreateImageBitmap(ScriptState*, 146 ScriptPromise CreateImageBitmap(ScriptState*,
145 EventTarget&, 147 EventTarget&,
146 Optional<IntRect> crop_rect, 148 Optional<IntRect> crop_rect,
147 const ImageBitmapOptions&, 149 const ImageBitmapOptions&,
148 ExceptionState&) override; 150 ExceptionState&) override;
149 151
150 void Trace(Visitor*); 152 void Trace(Visitor*);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 const unsigned&, 194 const unsigned&,
193 ExceptionState* = nullptr); 195 ExceptionState* = nullptr);
194 196
195 static DOMFloat32Array* ConvertFloat16ArrayToFloat32Array(const uint16_t*, 197 static DOMFloat32Array* ConvertFloat16ArrayToFloat32Array(const uint16_t*,
196 unsigned); 198 unsigned);
197 }; 199 };
198 200
199 } // namespace blink 201 } // namespace blink
200 202
201 #endif // ImageData_h 203 #endif // ImageData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp ('k') | third_party/WebKit/Source/core/html/ImageData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698