summaryrefslogtreecommitdiff
path: root/Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp')
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp122
1 files changed, 0 insertions, 122 deletions
diff --git a/Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp b/Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp
deleted file mode 100644
index 44cdd2f6f..000000000
--- a/Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2009, 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include "BackingStoreTile.h"
-
-#include "GraphicsContext.h"
-#include "SurfacePool.h"
-
-#include <BlackBerryPlatformGraphics.h>
-
-namespace BlackBerry {
-namespace WebKit {
-
-Fence::~Fence()
-{
- if (m_platformSync)
- SurfacePool::globalSurfacePool()->destroyPlatformSync(m_platformSync);
-}
-
-TileBuffer::TileBuffer(const Platform::IntSize& size)
- : m_lastRenderOrigin(-1, -1)
- , m_size(size)
- , m_fence(Fence::create())
- , m_nativeBuffer(0)
- , m_lastRenderScale(1.0)
- , m_backgroundPainted(false)
-{
-}
-
-TileBuffer::~TileBuffer()
-{
- Platform::Graphics::destroyBuffer(m_nativeBuffer);
-}
-
-Platform::IntSize TileBuffer::size() const
-{
- return m_size;
-}
-
-Platform::IntRect TileBuffer::surfaceRect() const
-{
- return Platform::IntRect(Platform::IntPoint::zero(), m_size);
-}
-
-Platform::IntRect TileBuffer::pixelContentsRect() const
-{
- return Platform::IntRect(m_lastRenderOrigin, m_size);
-}
-
-bool TileBuffer::isRendered(double scale) const
-{
- return isRendered(pixelContentsRect(), scale);
-}
-
-bool TileBuffer::isRendered(const Platform::IntRectRegion& pixelContentsRegion, double scale) const
-{
- return m_lastRenderScale == scale && Platform::IntRectRegion::subtractRegions(pixelContentsRegion, m_renderedRegion).isEmpty();
-}
-
-void TileBuffer::clearRenderedRegion(const Platform::IntRectRegion& region)
-{
- m_renderedRegion = Platform::IntRectRegion::subtractRegions(m_renderedRegion, region);
-}
-
-void TileBuffer::clearRenderedRegion()
-{
- m_renderedRegion = Platform::IntRectRegion();
-}
-
-void TileBuffer::addRenderedRegion(const Platform::IntRectRegion& region)
-{
- m_renderedRegion = Platform::IntRectRegion::unionRegions(region, m_renderedRegion);
-}
-
-Platform::IntRectRegion TileBuffer::renderedRegion() const
-{
- return m_renderedRegion;
-}
-
-Platform::IntRectRegion TileBuffer::notRenderedRegion() const
-{
- return Platform::IntRectRegion::subtractRegions(pixelContentsRect(), m_renderedRegion);
-}
-
-Platform::Graphics::Buffer* TileBuffer::nativeBuffer() const
-{
- if (!m_nativeBuffer)
- m_nativeBuffer = Platform::Graphics::createBuffer(m_size, Platform::Graphics::BackedWhenNecessary);
-
- return m_nativeBuffer;
-}
-
-bool TileBuffer::wasNativeBufferCreated() const
-{
- return static_cast<bool>(m_nativeBuffer);
-}
-
-void TileBuffer::paintBackground()
-{
- m_backgroundPainted = true;
-
- Platform::Graphics::clearBuffer(nativeBuffer(), 0, 0, 0, 0);
-}
-
-}
-}