diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp index 2ea7fb6ed..39365673e 100644 --- a/Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp +++ b/Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp @@ -18,18 +18,16 @@ */ #include "config.h" -#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) #include "TextureMapperTile.h" #include "Image.h" #include "TextureMapper.h" -#include <wtf/RefPtr.h> namespace WebCore { class GraphicsLayer; -void TextureMapperTile::updateContents(TextureMapper* textureMapper, Image* image, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag) +void TextureMapperTile::updateContents(TextureMapper& textureMapper, Image* image, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag) { IntRect targetRect = enclosingIntRect(m_rect); targetRect.intersect(dirtyRect); @@ -43,14 +41,14 @@ void TextureMapperTile::updateContents(TextureMapper* textureMapper, Image* imag // Normalize targetRect to the texture's coordinates. targetRect.move(-m_rect.x(), -m_rect.y()); if (!m_texture) { - m_texture = textureMapper->createTexture(); + m_texture = textureMapper.createTexture(); m_texture->reset(targetRect.size(), image->currentFrameKnownToBeOpaque() ? 0 : BitmapTexture::SupportsAlpha); } m_texture->updateContents(image, targetRect, sourceOffset, updateContentsFlag); } -void TextureMapperTile::updateContents(TextureMapper* textureMapper, GraphicsLayer* sourceLayer, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag) +void TextureMapperTile::updateContents(TextureMapper& textureMapper, GraphicsLayer* sourceLayer, const IntRect& dirtyRect, BitmapTexture::UpdateContentsFlag updateContentsFlag, float scale) { IntRect targetRect = enclosingIntRect(m_rect); targetRect.intersect(dirtyRect); @@ -62,18 +60,17 @@ void TextureMapperTile::updateContents(TextureMapper* textureMapper, GraphicsLay targetRect.move(-m_rect.x(), -m_rect.y()); if (!m_texture) { - m_texture = textureMapper->createTexture(); + m_texture = textureMapper.createTexture(); m_texture->reset(targetRect.size(), BitmapTexture::SupportsAlpha); } - m_texture->updateContents(textureMapper, sourceLayer, targetRect, sourceOffset, updateContentsFlag); + m_texture->updateContents(textureMapper, sourceLayer, targetRect, sourceOffset, updateContentsFlag, scale); } -void TextureMapperTile::paint(TextureMapper* textureMapper, const TransformationMatrix& transform, float opacity, const unsigned exposedEdges) +void TextureMapperTile::paint(TextureMapper& textureMapper, const TransformationMatrix& transform, float opacity, const unsigned exposedEdges) { if (texture().get()) - textureMapper->drawTexture(*texture().get(), rect(), transform, opacity, exposedEdges); + textureMapper.drawTexture(*texture().get(), rect(), transform, opacity, exposedEdges); } } // namespace WebCore -#endif |