Bug 215300
Summary: | Address additional review feedback from r265360 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kenneth Russell <kbr> |
Component: | Canvas | Assignee: | Kenneth Russell <kbr> |
Status: | ASSIGNED | ||
Severity: | Normal | CC: | dino, jdarpinian, sabouhallawa, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 183438 | ||
Bug Blocks: |
Kenneth Russell
From Bug 183438:
- Refactor copyPremultipliedToPremultiplied and copyUnpremultipliedToUnpremultiplied in Source/WebCore/platform/graphics/ImageBufferBackend.cpp .
- Remove comment which was added in place of the previous assert in copyImagePixelsAccelerated in Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp .
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Said Abou-Hallawa
Also
- The members: m_originClean, m_premultiplyAlpha and m_forciblyPremultiplyAlpha of ImageBitmap can be replaced by ImageBuffer::SerializationState. This will eliminate the need to sync the members of ImageBitmap and ImageBuffer::SerializationState. Also the whole struct can be copied in many places from std::pair<std::unique_ptr<ImageBuffer>, ImageBuffer::SerializationState> to ImageBitmap and vice versa.
Said Abou-Hallawa
Another approach is to make SerializationState enum class type and have an OptionSet< SerializationState> be stored in ImageBitmap:
enum class SerializationState {
OriginClean = 1 << 0,
PremultiplyAlpha = 1 << 1,
ForciblyPremultiplyAlpha = 1 << 2,
};
class ImageBitmap {
public:
bool originClean() const { return m_serializationState.contains(SerializationState::OriginClean); }
private:
OptionSet<SerializationState> m_serializationState;
};
Radar WebKit Bug Importer
<rdar://problem/67105644>