Upstream more platform/graphics/skia files Woohoo!
Created attachment 26544 [details] Add ImageBufferSkia and ImageSkia files. WebCore/ChangeLog | 31 ++ WebCore/platform/graphics/skia/ImageBufferSkia.cpp | 211 +++++++++ WebCore/platform/graphics/skia/ImageSkia.cpp | 483 ++++++++++++++++++++ 3 files changed, 725 insertions(+), 0 deletions(-)
Comment on attachment 26544 [details] Add ImageBufferSkia and ImageSkia files. Bah! Wrong patch again! (old files instead of scrubbed ones).
Created attachment 26546 [details] Add ImageBufferSkia and ImageSkia files. 2009-01-08 Dimitri Glazkov <dglazkov@chromium.org> Reviewed by Eric Seidel. Add ImageBufferSkia and ImageSkia files. https://bugs.webkit.org/show_bug.cgi?id=23200 For now we've left BitmapImage and BitmapImageSingleFrameSkia implementations in the ImageSkia file (like ImageCG has), but we intend to break them out into their own files. * platform/graphics/skia/ImageBufferSkia.cpp: Added. (WebCore::ImageBufferData::ImageBufferData): (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::context): (WebCore::ImageBuffer::image): (WebCore::ImageBuffer::getImageData): (WebCore::ImageBuffer::putImageData): (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/ImageSkia.cpp: Added. (WebCore::): (WebCore::FrameData::clear): (WebCore::Image::loadPlatformResource): (WebCore::Image::drawPattern): (WebCore::BitmapImage::initPlatformData): (WebCore::BitmapImage::invalidatePlatformData): (WebCore::BitmapImage::checkForSolidColor): (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): (WebCore::BitmapImageSingleFrameSkia::create): --- WebCore/ChangeLog | 31 ++ WebCore/platform/graphics/skia/ImageBufferSkia.cpp | 210 +++++++++ WebCore/platform/graphics/skia/ImageSkia.cpp | 458 ++++++++++++++++++++ 3 files changed, 699 insertions(+), 0 deletions(-)
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog A WebCore/platform/graphics/skia/ImageBufferSkia.cpp A WebCore/platform/graphics/skia/ImageSkia.cpp Committed r39727
Created attachment 26547 [details] Add NativeImageSkia (PlatformImagePtr) to platform/graphics/skia WebCore/ChangeLog | 18 +++ WebCore/platform/graphics/skia/NativeImageSkia.cpp | 109 ++++++++++++++++++++ WebCore/platform/graphics/skia/NativeImageSkia.h | 104 +++++++++++++++++++ 3 files changed, 231 insertions(+), 0 deletions(-)
Created attachment 26549 [details] Add ImageSourceSkia to platform/graphics/skia WebCore/ChangeLog | 33 +++ WebCore/platform/graphics/ImageSource.h | 4 +- WebCore/platform/graphics/skia/ImageSourceSkia.cpp | 249 ++++++++++++++++++++ WebCore/platform/graphics/skia/ImageSourceSkia.h | 60 +++++ 4 files changed, 345 insertions(+), 1 deletions(-)
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/platform/graphics/ImageSource.h A WebCore/platform/graphics/skia/ImageSourceSkia.cpp A WebCore/platform/graphics/skia/ImageSourceSkia.h Committed r39729
Created attachment 26551 [details] Add PathSkia and PatternSkia implementations to WebCore WebCore/ChangeLog | 35 +++ WebCore/platform/graphics/skia/PathSkia.cpp | 299 ++++++++++++++++++++++++ WebCore/platform/graphics/skia/PatternSkia.cpp | 55 +++++ 3 files changed, 389 insertions(+), 0 deletions(-)
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog A WebCore/platform/graphics/skia/PathSkia.cpp A WebCore/platform/graphics/skia/PatternSkia.cpp Committed r39730
*** Bug 23147 has been marked as a duplicate of this bug. ***
Comment on attachment 26547 [details] Add NativeImageSkia (PlatformImagePtr) to platform/graphics/skia View in context: https://bugs.webkit.org/attachment.cgi?id=26547&action=review > WebCore/platform/graphics/skia/NativeImageSkia.h:40 > +class NativeImageSkia : public SkBitmap { Hrm.. this may not be safe. SkBitmap has a non-virtual destructor and it uses dangerous tricks in its operator= implementation that may clobber derived class members depending on alignment. (When a class derives from a non-POD object, its members can reside inside the sizeof its parent class.) Looks like this may be related to a memory leak bug https://bugs.webkit.org/show_bug.cgi?id=66488 and possibly other random bugs unless we've been lucky. Anyhoo, I'm attempting to make SkBitmap a member rather than deriving from it. It would be great if we could instrument classes such as this so that it would be a compiler warning/error to derive from them.