summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp')
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp17
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