Skip to content

Commit

Permalink
Revert "Cherry-pick e633a9d. rdar://113298905"
Browse files Browse the repository at this point in the history
This reverts commit aa90250.

Identifier: 267312.2@safari-7617.1.6-branch
  • Loading branch information
Dan Robson authored and drobson1005 committed Aug 29, 2023
1 parent 3047163 commit 49d771c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 57 deletions.
9 changes: 0 additions & 9 deletions LayoutTests/http/tests/images/repaint-garbled-expected.html

This file was deleted.

36 changes: 0 additions & 36 deletions LayoutTests/http/tests/images/repaint-garbled.html

This file was deleted.

Binary file not shown.
13 changes: 1 addition & 12 deletions Source/WebCore/platform/graphics/cg/ImageBackingStoreCG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@

namespace WebCore {

static void dataProviderReleaseCallback(void* info, const void*, size_t)
{
auto* pixels = static_cast<FragmentedSharedBuffer::DataSegment*>(info);
pixels->deref(); // Balanced below in ImageBackingStore::image().
}

PlatformImagePtr ImageBackingStore::image() const
{
static const size_t bytesPerPixel = 4;
Expand All @@ -43,12 +37,7 @@ PlatformImagePtr ImageBackingStore::image() const
size_t bytesPerRow = bytesPerPixel * width;

auto colorSpace = adoptCF(CGColorSpaceCreateWithName(kCGColorSpaceSRGB));
auto dataProvider = adoptCF(CGDataProviderCreateWithData(m_pixels.get(), m_pixelsPtr, height * bytesPerRow, dataProviderReleaseCallback));

if (!dataProvider)
return nullptr;

m_pixels->ref(); // Balanced above in dataProviderReleaseCallback().
auto dataProvider = adoptCF(CGDataProviderCreateWithData(nullptr, m_pixelsPtr, height * bytesPerRow, nullptr));
return adoptCF(CGImageCreate(width, height, bitsPerComponent, bytesPerPixel * 8, bytesPerRow, colorSpace.get(), (m_premultiplyAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaFirst) | kCGImageByteOrder32Little, dataProvider.get(), nullptr, true, kCGRenderingIntentDefault));
}

Expand Down

0 comments on commit 49d771c

Please sign in to comment.