Bug 23200 - Upstream more platform/graphics/skia files
Summary: Upstream more platform/graphics/skia files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 23147 (view as bug list)
Depends on:
Blocks: 23146 23147
  Show dependency treegraph
 
Reported: 2009-01-08 16:33 PST by Eric Seidel (no email)
Modified: 2011-08-23 17:46 PDT (History)
2 users (show)

See Also:


Attachments
Add ImageBufferSkia and ImageSkia files. (29.03 KB, patch)
2009-01-08 16:34 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Add ImageBufferSkia and ImageSkia files. (28.56 KB, patch)
2009-01-08 16:41 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Add NativeImageSkia (PlatformImagePtr) to platform/graphics/skia (10.50 KB, patch)
2009-01-08 16:54 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Add ImageSourceSkia to platform/graphics/skia (13.37 KB, patch)
2009-01-08 17:01 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Add PathSkia and PatternSkia implementations to WebCore (13.27 KB, patch)
2009-01-08 17:16 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2009-01-08 16:33:15 PST
Upstream more platform/graphics/skia files

Woohoo!
Comment 1 Eric Seidel (no email) 2009-01-08 16:34:33 PST
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 2 Eric Seidel (no email) 2009-01-08 16:39:35 PST
Comment on attachment 26544 [details]
Add ImageBufferSkia and ImageSkia files.

Bah!  Wrong patch again! (old files instead of scrubbed ones).
Comment 3 Eric Seidel (no email) 2009-01-08 16:41:02 PST
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(-)
Comment 4 Eric Seidel (no email) 2009-01-08 16:42:11 PST
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
Comment 5 Eric Seidel (no email) 2009-01-08 16:54:09 PST
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(-)
Comment 6 Eric Seidel (no email) 2009-01-08 17:01:46 PST
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(-)
Comment 7 Eric Seidel (no email) 2009-01-08 17:07:20 PST
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
Comment 8 Eric Seidel (no email) 2009-01-08 17:16:50 PST
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(-)
Comment 9 Eric Seidel (no email) 2009-01-08 17:18:40 PST
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
Comment 10 Dimitri Glazkov (Google) 2009-01-08 20:45:53 PST
*** Bug 23147 has been marked as a duplicate of this bug. ***
Comment 11 John Bates 2011-08-23 17:46:21 PDT
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.