Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (183806 => 183807)
--- trunk/Source/WebCore/CMakeLists.txt 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/CMakeLists.txt 2015-05-05 15:48:29 UTC (rev 183807)
@@ -2194,7 +2194,6 @@
platform/graphics/texmap/TextureMapperAnimation.cpp
platform/graphics/texmap/TextureMapperBackingStore.cpp
platform/graphics/texmap/TextureMapperFPSCounter.cpp
- platform/graphics/texmap/TextureMapperImageBuffer.cpp
platform/graphics/texmap/TextureMapperLayer.cpp
platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp
platform/graphics/texmap/TextureMapperTile.cpp
Modified: trunk/Source/WebCore/ChangeLog (183806 => 183807)
--- trunk/Source/WebCore/ChangeLog 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/ChangeLog 2015-05-05 15:48:29 UTC (rev 183807)
@@ -1,3 +1,42 @@
+2015-05-05 Csaba Osztrogonác <[email protected]>
+
+ Remove TextureMapperImageBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=143561
+
+ Reviewed by Žan Doberšek.
+
+ * CMakeLists.txt:
+ * PlatformEfl.cmake:
+ * PlatformGTK.cmake:
+ * PlatformWinCairo.cmake:
+ * platform/graphics/GraphicsContext3DPrivate.cpp:
+ (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
+ * platform/graphics/cairo/ImageBufferCairo.cpp:
+ (WebCore::ImageBufferData::paintToTextureMapper):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+ (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
+ * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Removed.
+ * platform/graphics/texmap/BitmapTextureImageBuffer.h: Removed.
+ * platform/graphics/texmap/BitmapTexturePool.cpp:
+ (WebCore::BitmapTexturePool::createTexture):
+ * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+ (WebCore::GraphicsLayerTextureMapper::setFilters):
+ * platform/graphics/texmap/TextureMapper.cpp:
+ (WebCore::TextureMapper::create):
+ (WebCore::TextureMapper::TextureMapper):
+ * platform/graphics/texmap/TextureMapper.h:
+ (WebCore::TextureMapper::accelerationMode): Deleted.
+ * platform/graphics/texmap/TextureMapperGL.cpp:
+ (WebCore::TextureMapperGL::TextureMapperGL):
+ * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Removed.
+ * platform/graphics/texmap/TextureMapperImageBuffer.h: Removed.
+ * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
+ (WebCore::CompositingCoordinator::CompositingCoordinator):
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::GraphicsLayer::supportsContentsTiling):
+ (WebCore::CoordinatedGraphicsLayer::setShouldSupportContentsTiling): Deleted.
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+
2015-05-05 Javier Fernandez <[email protected]>
[CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
Modified: trunk/Source/WebCore/PlatformEfl.cmake (183806 => 183807)
--- trunk/Source/WebCore/PlatformEfl.cmake 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/PlatformEfl.cmake 2015-05-05 15:48:29 UTC (rev 183807)
@@ -182,7 +182,6 @@
platform/graphics/texmap/BitmapTexture.cpp
platform/graphics/texmap/BitmapTextureGL.cpp
- platform/graphics/texmap/BitmapTextureImageBuffer.cpp
platform/graphics/texmap/BitmapTexturePool.cpp
platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
platform/graphics/texmap/TextureMapperGL.cpp
Modified: trunk/Source/WebCore/PlatformGTK.cmake (183806 => 183807)
--- trunk/Source/WebCore/PlatformGTK.cmake 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/PlatformGTK.cmake 2015-05-05 15:48:29 UTC (rev 183807)
@@ -383,11 +383,9 @@
list(APPEND WebCore_SOURCES
platform/graphics/texmap/BitmapTexture.cpp
platform/graphics/texmap/BitmapTextureGL.cpp
- platform/graphics/texmap/BitmapTextureImageBuffer.cpp
platform/graphics/texmap/BitmapTexturePool.cpp
platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
platform/graphics/texmap/TextureMapperGL.cpp
- platform/graphics/texmap/TextureMapperImageBuffer.cpp
platform/graphics/texmap/TextureMapperShaderProgram.cpp
)
endif ()
Modified: trunk/Source/WebCore/PlatformWinCairo.cmake (183806 => 183807)
--- trunk/Source/WebCore/PlatformWinCairo.cmake 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/PlatformWinCairo.cmake 2015-05-05 15:48:29 UTC (rev 183807)
@@ -59,7 +59,6 @@
platform/graphics/texmap/BitmapTexture.cpp
platform/graphics/texmap/BitmapTextureGL.cpp
- platform/graphics/texmap/BitmapTextureImageBuffer.cpp
platform/graphics/texmap/BitmapTexturePool.cpp
platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
platform/graphics/texmap/TextureMapper.cpp
@@ -67,7 +66,6 @@
platform/graphics/texmap/TextureMapperBackingStore.cpp
platform/graphics/texmap/TextureMapperFPSCounter.cpp
platform/graphics/texmap/TextureMapperGL.cpp
- platform/graphics/texmap/TextureMapperImageBuffer.cpp
platform/graphics/texmap/TextureMapperLayer.cpp
platform/graphics/texmap/TextureMapperShaderProgram.cpp
platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -89,45 +89,6 @@
m_context->markLayerComposited();
- // FIXME: We do not support mask for the moment with TextureMapperImageBuffer.
- if (textureMapper->accelerationMode() != TextureMapper::OpenGLMode) {
- GraphicsContext* context = textureMapper->graphicsContext();
- context->save();
- context->platformContext()->setGlobalAlpha(opacity);
-
- const int height = m_context->m_currentHeight;
- const int width = m_context->m_currentWidth;
- int totalBytes = width * height * 4;
-
- auto pixels = std::make_unique<unsigned char[]>(totalBytes);
- if (!pixels)
- return;
-
- // OpenGL keeps the pixels stored bottom up, so we need to flip the image here.
- context->translate(0, height);
- context->scale(FloatSize(1, -1));
-
- context->concatCTM(matrix.toAffineTransform());
-
- m_context->readRenderingResults(pixels.get(), totalBytes);
-
- // Premultiply alpha.
- for (int i = 0; i < totalBytes; i += 4)
- if (pixels[i + 3] != 255) {
- pixels[i + 0] = min(255, pixels[i + 0] * pixels[i + 3] / 255);
- pixels[i + 1] = min(255, pixels[i + 1] * pixels[i + 3] / 255);
- pixels[i + 2] = min(255, pixels[i + 2] * pixels[i + 3] / 255);
- }
-
- RefPtr<cairo_surface_t> imageSurface = adoptRef(cairo_image_surface_create_for_data(
- const_cast<unsigned char*>(pixels.get()), CAIRO_FORMAT_ARGB32, width, height, width * 4));
-
- context->platformContext()->drawSurfaceToContext(imageSurface.get(), targetRect, IntRect(0, 0, width, height), context);
-
- context->restore();
- return;
- }
-
#if USE(TEXTURE_MAPPER_GL)
if (m_context->m_attrs.antialias && m_context->m_state.boundFBO == m_context->m_multisampleFBO) {
GLContext* previousActiveContext = GLContext::getCurrent();
Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -396,11 +396,6 @@
#if ENABLE(ACCELERATED_2D_CANVAS)
void ImageBufferData::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity)
{
- if (textureMapper->accelerationMode() != TextureMapper::OpenGLMode) {
- notImplemented();
- return;
- }
-
ASSERT(m_texture);
// Cairo may change the active context, so we make sure to change it back after flushing.
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -530,9 +530,6 @@
#if USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS)
void MediaPlayerPrivateGStreamerBase::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity)
{
- if (textureMapper->accelerationMode() != TextureMapper::OpenGLMode)
- return;
-
if (!m_player->visible())
return;
Deleted: trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureImageBuffer.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureImageBuffer.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureImageBuffer.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2014 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "BitmapTextureImageBuffer.h"
-
-#include "GraphicsLayer.h"
-
-namespace WebCore {
-
-void BitmapTextureImageBuffer::updateContents(const void* data, const IntRect& targetRect, const IntPoint& sourceOffset, int bytesPerLine, UpdateContentsFlag)
-{
-#if PLATFORM(CAIRO)
- RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create_for_data(static_cast<unsigned char*>(data()),
- CAIRO_FORMAT_ARGB32, targetRect.width(), targetRect.height(), bytesPerLine));
- m_image->context()->platformContext()->drawSurfaceToContext(surface.get(), targetRect,
- IntRect(sourceOffset, targetRect.size()), m_image->context());
-#else
- UNUSED_PARAM(data);
- UNUSED_PARAM(targetRect);
- UNUSED_PARAM(sourceOffset);
- UNUSED_PARAM(bytesPerLine);
-#endif
-}
-
-void BitmapTextureImageBuffer::updateContents(TextureMapper*, GraphicsLayer* sourceLayer, const IntRect& targetRect, const IntPoint& sourceOffset, UpdateContentsFlag)
-{
- GraphicsContext* context = m_image->context();
-
- context->clearRect(targetRect);
-
- IntRect sourceRect(targetRect);
- sourceRect.setLocation(sourceOffset);
- context->save();
- context->clip(targetRect);
- context->translate(targetRect.x() - sourceOffset.x(), targetRect.y() - sourceOffset.y());
- sourceLayer->paintGraphicsLayerContents(*context, sourceRect);
- context->restore();
-}
-
-void BitmapTextureImageBuffer::didReset()
-{
- m_image = ImageBuffer::create(contentSize());
-}
-
-void BitmapTextureImageBuffer::updateContents(Image* image, const IntRect& targetRect, const IntPoint& offset, UpdateContentsFlag)
-{
- m_image->context()->drawImage(image, ColorSpaceDeviceRGB, targetRect, IntRect(offset, targetRect.size()), CompositeCopy);
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureImageBuffer.h (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureImageBuffer.h 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureImageBuffer.h 2015-05-05 15:48:29 UTC (rev 183807)
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2014 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BitmapTextureImageBuffer_h
-#define BitmapTextureImageBuffer_h
-
-#include "BitmapTexture.h"
-#include "ImageBuffer.h"
-#include "IntRect.h"
-#include "IntSize.h"
-
-namespace WebCore {
-
-class GraphicsContext;
-
-class BitmapTextureImageBuffer : public BitmapTexture {
-public:
- static PassRefPtr<BitmapTexture> create() { return adoptRef(new BitmapTextureImageBuffer); }
- virtual IntSize size() const { return m_image->internalSize(); }
- virtual void didReset();
- virtual bool isValid() const { return m_image.get(); }
- inline GraphicsContext* graphicsContext() { return m_image ? m_image->context() : 0; }
- virtual void updateContents(Image*, const IntRect&, const IntPoint&, UpdateContentsFlag);
- virtual void updateContents(TextureMapper*, GraphicsLayer*, const IntRect& target, const IntPoint& offset, UpdateContentsFlag);
- virtual void updateContents(const void*, const IntRect& target, const IntPoint& sourceOffset, int bytesPerLine, UpdateContentsFlag);
- PassRefPtr<BitmapTexture> applyFilters(TextureMapper*, const FilterOperations&);
- ImageBuffer* image() const { return m_image.get(); }
-
-private:
- BitmapTextureImageBuffer() { }
- std::unique_ptr<ImageBuffer> m_image;
-};
-
-}
-
-#endif // BitmapTextureImageBuffer_h
Modified: trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -106,8 +106,6 @@
#if USE(TEXTURE_MAPPER_GL)
BitmapTextureGL* texture = new BitmapTextureGL(m_context3D);
return adoptRef(texture);
-#else
- return BitmapTextureImageBuffer::create();
#endif
}
Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -602,8 +602,7 @@
bool GraphicsLayerTextureMapper::setFilters(const FilterOperations& filters)
{
TextureMapper* textureMapper = m_layer.textureMapper();
- // TextureMapperImageBuffer does not support CSS filters.
- if (!textureMapper || textureMapper->accelerationMode() == TextureMapper::SoftwareMode)
+ if (!textureMapper)
return false;
notifyChange(FilterChange);
return GraphicsLayer::setFilters(filters);
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -23,7 +23,6 @@
#include "BitmapTexturePool.h"
#include "FilterOperations.h"
#include "GraphicsLayer.h"
-#include "TextureMapperImageBuffer.h"
#include "Timer.h"
#include <wtf/CurrentTime.h>
@@ -38,18 +37,15 @@
return selectedTexture.release();
}
-std::unique_ptr<TextureMapper> TextureMapper::create(AccelerationMode mode)
+std::unique_ptr<TextureMapper> TextureMapper::create()
{
- if (mode == SoftwareMode)
- return std::make_unique<TextureMapperImageBuffer>();
return platformCreateAccelerated();
}
-TextureMapper::TextureMapper(AccelerationMode accelerationMode)
+TextureMapper::TextureMapper()
: m_context(0)
, m_interpolationQuality(InterpolationDefault)
, m_textDrawingMode(TextModeFill)
- , m_accelerationMode(accelerationMode)
, m_isMaskMode(false)
, m_wrapMode(StretchWrap)
{ }
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h 2015-05-05 15:48:29 UTC (rev 183807)
@@ -47,7 +47,6 @@
class TextureMapper {
WTF_MAKE_FAST_ALLOCATED;
public:
- enum AccelerationMode { SoftwareMode, OpenGLMode };
enum PaintFlag {
PaintingMirrored = 1 << 0,
};
@@ -59,9 +58,9 @@
typedef unsigned PaintFlags;
- static std::unique_ptr<TextureMapper> create(AccelerationMode newMode = SoftwareMode);
+ static std::unique_ptr<TextureMapper> create();
- explicit TextureMapper(AccelerationMode);
+ explicit TextureMapper();
virtual ~TextureMapper();
enum ExposedEdges {
@@ -93,7 +92,6 @@
InterpolationQuality imageInterpolationQuality() const { return m_interpolationQuality; }
TextDrawingModeFlags textDrawingMode() const { return m_textDrawingMode; }
- AccelerationMode accelerationMode() const { return m_accelerationMode; }
virtual void beginPainting(PaintFlags = 0) { }
virtual void endPainting() { }
@@ -126,7 +124,6 @@
#endif
InterpolationQuality m_interpolationQuality;
TextDrawingModeFlags m_textDrawingMode;
- AccelerationMode m_accelerationMode;
bool m_isMaskMode;
TransformationMatrix m_patternTransform;
WrapMode m_wrapMode;
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -241,8 +241,7 @@
}
TextureMapperGL::TextureMapperGL()
- : TextureMapper(OpenGLMode)
- , m_enableEdgeDistanceAntialiasing(false)
+ : m_enableEdgeDistanceAntialiasing(false)
{
m_context3D = GraphicsContext3D::createForCurrentGLContext();
m_data = new TextureMapperGLData(m_context3D.get());
Deleted: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -1,125 +0,0 @@
-/*
- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "TextureMapperImageBuffer.h"
-
-#include "BitmapTexturePool.h"
-#include "GraphicsLayer.h"
-#include "NotImplemented.h"
-
-#if USE(TEXTURE_MAPPER)
-namespace WebCore {
-
-static const int s_maximumAllowedImageBufferDimension = 4096;
-
-TextureMapperImageBuffer::TextureMapperImageBuffer()
- : TextureMapper(SoftwareMode)
-{
- m_texturePool = std::make_unique<BitmapTexturePool>();
-}
-
-IntSize TextureMapperImageBuffer::maxTextureSize() const
-{
- return IntSize(s_maximumAllowedImageBufferDimension, s_maximumAllowedImageBufferDimension);
-}
-
-void TextureMapperImageBuffer::beginClip(const TransformationMatrix& matrix, const FloatRect& rect)
-{
- GraphicsContext* context = currentContext();
- if (!context)
- return;
-#if ENABLE(3D_TRANSFORMS)
- TransformationMatrix previousTransform = context->get3DTransform();
-#else
- AffineTransform previousTransform = context->getCTM();
-#endif
- context->save();
-
-#if ENABLE(3D_TRANSFORMS)
- context->concat3DTransform(matrix);
-#else
- context->concatCTM(matrix.toAffineTransform());
-#endif
-
- context->clip(rect);
-
-#if ENABLE(3D_TRANSFORMS)
- context->set3DTransform(previousTransform);
-#else
- context->setCTM(previousTransform);
-#endif
-}
-
-void TextureMapperImageBuffer::drawTexture(const BitmapTexture& texture, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity, unsigned /* exposedEdges */)
-{
- GraphicsContext* context = currentContext();
- if (!context)
- return;
-
- const BitmapTextureImageBuffer& textureImageBuffer = static_cast<const BitmapTextureImageBuffer&>(texture);
- ImageBuffer* image = textureImageBuffer.image();
- context->save();
- context->setCompositeOperation(isInMaskMode() ? CompositeDestinationIn : CompositeSourceOver);
- context->setAlpha(opacity);
-#if ENABLE(3D_TRANSFORMS)
- context->concat3DTransform(matrix);
-#else
- context->concatCTM(matrix.toAffineTransform());
-#endif
- context->drawImageBuffer(image, ColorSpaceDeviceRGB, targetRect);
- context->restore();
-}
-
-void TextureMapperImageBuffer::drawSolidColor(const FloatRect& rect, const TransformationMatrix& matrix, const Color& color)
-{
- GraphicsContext* context = currentContext();
- if (!context)
- return;
-
- context->save();
- context->setCompositeOperation(isInMaskMode() ? CompositeDestinationIn : CompositeSourceOver);
-#if ENABLE(3D_TRANSFORMS)
- context->concat3DTransform(matrix);
-#else
- context->concatCTM(matrix.toAffineTransform());
-#endif
-
- context->fillRect(rect, color, ColorSpaceDeviceRGB);
- context->restore();
-}
-
-void TextureMapperImageBuffer::drawBorder(const Color&, float /* borderWidth */, const FloatRect&, const TransformationMatrix&)
-{
- notImplemented();
-}
-
-void TextureMapperImageBuffer::drawNumber(int /* number */, const Color&, const FloatPoint&, const TransformationMatrix&)
-{
- notImplemented();
-}
-
-PassRefPtr<BitmapTexture> BitmapTextureImageBuffer::applyFilters(TextureMapper*, const FilterOperations&)
-{
- ASSERT_NOT_REACHED();
- return this;
-}
-
-}
-#endif
Deleted: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h 2015-05-05 15:48:29 UTC (rev 183807)
@@ -1,59 +0,0 @@
-/*
- Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
- */
-
-#ifndef TextureMapperImageBuffer_h
-#define TextureMapperImageBuffer_h
-
-#include "BitmapTextureImageBuffer.h"
-#include "ImageBuffer.h"
-#include "TextureMapper.h"
-
-#if USE(TEXTURE_MAPPER)
-namespace WebCore {
-
-class TextureMapperImageBuffer : public TextureMapper {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- TextureMapperImageBuffer();
-
- // TextureMapper implementation
- virtual void drawBorder(const Color&, float borderWidth, const FloatRect&, const TransformationMatrix&) override;
- virtual void drawNumber(int number, const Color&, const FloatPoint&, const TransformationMatrix&) override;
- virtual void drawTexture(const BitmapTexture&, const FloatRect& targetRect, const TransformationMatrix&, float opacity, unsigned exposedEdges) override;
- virtual void drawSolidColor(const FloatRect&, const TransformationMatrix&, const Color&) override;
- virtual void beginClip(const TransformationMatrix&, const FloatRect&) override;
- virtual void bindSurface(BitmapTexture* surface) override { m_currentSurface = surface;}
- virtual void endClip() override { graphicsContext()->restore(); }
- virtual IntRect clipBounds() override { return currentContext()->clipBounds(); }
- virtual IntSize maxTextureSize() const;
- virtual PassRefPtr<BitmapTexture> createTexture() override { return BitmapTextureImageBuffer::create(); }
-
- inline GraphicsContext* currentContext()
- {
- return m_currentSurface ? static_cast<BitmapTextureImageBuffer*>(m_currentSurface.get())->graphicsContext() : graphicsContext();
- }
-
-private:
- RefPtr<BitmapTexture> m_currentSurface;
-};
-
-}
-#endif // USE(TEXTURE_MAPPER)
-
-#endif // TextureMapperImageBuffer_h
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -65,10 +65,6 @@
#endif
{
m_page->settings().setApplyDeviceScaleFactorInCompositor(true);
-
- // This is a temporary way to enable this only in the GL case, until TextureMapperImageBuffer is removed.
- // See https://bugs.webkit.org/show_bug.cgi?id=114869
- CoordinatedGraphicsLayer::setShouldSupportContentsTiling(true);
}
void CompositingCoordinator::setRootCompositingLayer(GraphicsLayer* compositingLayer, GraphicsLayer* overlayLayer)
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -366,16 +366,9 @@
didChangeLayerState();
}
-static bool s_shouldSupportContentsTiling = false;
-
-void CoordinatedGraphicsLayer::setShouldSupportContentsTiling(bool s)
-{
- s_shouldSupportContentsTiling = s;
-}
-
bool GraphicsLayer::supportsContentsTiling()
{
- return s_shouldSupportContentsTiling;
+ return true;
}
void CoordinatedGraphicsLayer::setContentsNeedsDisplay()
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (183806 => 183807)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2015-05-05 15:48:29 UTC (rev 183807)
@@ -147,7 +147,6 @@
void setNeedsVisibleRectAdjustment();
void purgeBackingStores();
- static void setShouldSupportContentsTiling(bool);
CoordinatedGraphicsLayer* findFirstDescendantWithContentsRecursively();
private:
Modified: trunk/Source/WebKit2/ChangeLog (183806 => 183807)
--- trunk/Source/WebKit2/ChangeLog 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebKit2/ChangeLog 2015-05-05 15:48:29 UTC (rev 183807)
@@ -1,3 +1,15 @@
+2015-05-05 Csaba Osztrogonác <[email protected]>
+
+ Remove TextureMapperImageBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=143561
+
+ Reviewed by Žan Doberšek.
+
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+ (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
+ * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
+ (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
+
2015-05-05 Carlos Garcia Campos <[email protected]>
[SOUP] Network Cache: IOChannel operations are not sent to the right thread
Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (183806 => 183807)
--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -72,7 +72,7 @@
void CoordinatedGraphicsScene::paintToCurrentGLContext(const TransformationMatrix& matrix, float opacity, const FloatRect& clipRect, const Color& backgroundColor, bool drawsBackground, const FloatPoint& contentPosition, TextureMapper::PaintFlags PaintFlags)
{
if (!m_textureMapper) {
- m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
+ m_textureMapper = TextureMapper::create();
static_cast<TextureMapperGL*>(m_textureMapper.get())->setEnableEdgeDistanceAntialiasing(true);
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp (183806 => 183807)
--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp 2015-05-05 15:20:36 UTC (rev 183806)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp 2015-05-05 15:48:29 UTC (rev 183807)
@@ -375,7 +375,7 @@
ASSERT(m_isValid);
ASSERT(!m_textureMapper);
- m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);
+ m_textureMapper = TextureMapper::create();
static_cast<TextureMapperGL*>(m_textureMapper.get())->setEnableEdgeDistanceAntialiasing(true);
downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().setTextureMapper(m_textureMapper.get());