Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add ImageBuffer support for having a hi-res backing store. This allows
ImageBuffer clients to specify a scale factor upon creation so that they don't have to maintain that info themselves as they use/pass around the ImageBuffer. https://bugs.webkit.org/show_bug.cgi?id=79395 Reviewed by Dan Bernstein. No new tests. This patch doesn't change behavior. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::create): Scale the backing store by the resolution scale. (WebCore::ImageBuffer::logicalSize): Differentiate the logical size from the backing store's size. (WebCore::ImageBuffer::internalSize): The backing store's size. * platform/graphics/cg/ImageBufferCG.cpp: Prefer the explicit use of logicalSize and internalSize. Explicitly state a 1x scale for all ImageBuffer creation sites since this is what they currently assume. * html/HTMLCanvasElement.cpp: * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/WebGLRenderingContext.cpp: * page/Frame.cpp: * platform/graphics/CrossfadeGeneratedImage.cpp: * platform/graphics/ShadowBlur.cpp: * platform/graphics/filters/FEColorMatrix.cpp: * platform/graphics/filters/FEDropShadow.cpp: * platform/graphics/filters/FilterEffect.cpp: * platform/mac/ScrollbarThemeMac.mm: * rendering/FilterEffectRenderer.cpp: * rendering/RenderThemeMac.mm: * rendering/svg/SVGImageBufferTools.cpp: * svg/graphics/SVGImage.cpp: * svg/graphics/SVGImageCache.cpp: Update ImageBuffer::size() calls to new versions. * platform/graphics/GraphicsContext.cpp: * platform/graphics/ImageBuffer.cpp: * platform/graphics/skia/PlatformContextSkia.cpp: Canonical link: https://commits.webkit.org/96783@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
125 additions
and 101 deletions.
- +41 −0 Source/WebCore/ChangeLog
- +3 −2 Source/WebCore/html/HTMLCanvasElement.cpp
- +4 −4 Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
- +2 −2 Source/WebCore/html/canvas/WebGLRenderingContext.cpp
- +2 −2 Source/WebCore/page/Frame.cpp
- +1 −1 Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
- +8 −8 Source/WebCore/platform/graphics/GraphicsContext.cpp
- +1 −1 Source/WebCore/platform/graphics/ImageBuffer.cpp
- +21 −15 Source/WebCore/platform/graphics/ImageBuffer.h
- +3 −3 Source/WebCore/platform/graphics/ShadowBlur.cpp
- +0 −5 Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
- +26 −25 Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
- +1 −1 Source/WebCore/platform/graphics/filters/FEDropShadow.cpp
- +2 −2 Source/WebCore/platform/graphics/filters/FilterEffect.cpp
- +0 −5 Source/WebCore/platform/graphics/qt/ImageBufferQt.cpp
- +0 −5 Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
- +1 −1 Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
- +1 −1 Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
- +0 −5 Source/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
- +0 −6 Source/WebCore/platform/graphics/wx/ImageBufferWx.cpp
- +1 −1 Source/WebCore/platform/mac/ScrollbarThemeMac.mm
- +2 −1 Source/WebCore/rendering/FilterEffectRenderer.cpp
- +1 −1 Source/WebCore/rendering/RenderThemeMac.mm
- +2 −2 Source/WebCore/rendering/svg/SVGImageBufferTools.cpp
- +1 −1 Source/WebCore/svg/graphics/SVGImage.cpp
- +1 −1 Source/WebCore/svg/graphics/SVGImageCache.cpp
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -76,11 +76,6 @@ ImageBuffer::~ImageBuffer() | ||
cairo_surface_destroy(m_data.m_surface); | ||
} | ||
|
||
GraphicsContext* ImageBuffer::context() const | ||
{ | ||
return m_context.get(); | ||
Oops, something went wrong.