Remove down-casting to BitmapImage in GraphicsContext::drawImage.
authorkseo@webkit.org <kseo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jul 2012 17:19:28 +0000 (17:19 +0000)
committerkseo@webkit.org <kseo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jul 2012 17:19:28 +0000 (17:19 +0000)
commit1d34c2923feee2841a9ed1411ebf3da04df2d5f1
treebabcec0204cd429ddb56fefd1612418644ac8abc
parentda841c6e66b93dd98b2b00b313a9bdd59f6dd5b5
Remove down-casting to BitmapImage in GraphicsContext::drawImage.
https://bugs.webkit.org/show_bug.cgi?id=90755

Patch by Huang Dongsung <luxtella@company100.net> on 2012-07-13
Reviewed by Simon Fraser.

Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as
the last argument for CG. Then we can remove the conditional down-casting in
GraphicsContext::drawImage.

This change is needed for parallel image decoders. Because parallel image
decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the
down-casting above causes the loss of RespectImageOrientationEnum which must be
passed to BitmapImage.

No new tests, no behavior change.

* platform/graphics/BitmapImage.cpp:
* platform/graphics/BitmapImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
* platform/graphics/Image.cpp:
(WebCore::Image::draw):
(WebCore):
* platform/graphics/Image.h:
(Image):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/BitmapImage.cpp
Source/WebCore/platform/graphics/BitmapImage.h
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/graphics/Image.h