Commit a7583c0e authored by anilsson@rim.com's avatar anilsson@rim.com

[BlackBerry] Remove the setContentsToColor flavor of LayerTiler::TextureJob

https://bugs.webkit.org/show_bug.cgi?id=115092

Reviewed by Carlos Garcia Campos.

With the Skia backend, we had an optimization to detect solid color
layers. The Skia code has been purged, but these bits remained. With
BlackBerry::Platform::Graphics::PlatformGraphicsContext, only the solid
color will be drawn anyway, so we don't need to detect such layers at
the WebCore level. Fixed by removing the setContentsToColor flavor of
LayerTiler::TextureJob.

BlackBerry::WebKit::WebOverlay still uses
TextureCacheCompositingThread::textureForColor() so that one can stay
for now.

This was dead code so no new tests.

* platform/graphics/blackberry/LayerTile.cpp:
* platform/graphics/blackberry/LayerTile.h:
(LayerTile):
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::processTextureJob):
(WebCore::LayerTiler::performTileJob):
* platform/graphics/blackberry/LayerTiler.h:
(WebCore::LayerTiler::TextureJob::setContents):
(TextureJob):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 30ce27e9
2013-04-24 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Remove the setContentsToColor flavor of LayerTiler::TextureJob
https://bugs.webkit.org/show_bug.cgi?id=115092
Reviewed by Carlos Garcia Campos.
With the Skia backend, we had an optimization to detect solid color
layers. The Skia code has been purged, but these bits remained. With
BlackBerry::Platform::Graphics::PlatformGraphicsContext, only the solid
color will be drawn anyway, so we don't need to detect such layers at
the WebCore level. Fixed by removing the setContentsToColor flavor of
LayerTiler::TextureJob.
BlackBerry::WebKit::WebOverlay still uses
TextureCacheCompositingThread::textureForColor() so that one can stay
for now.
This was dead code so no new tests.
* platform/graphics/blackberry/LayerTile.cpp:
* platform/graphics/blackberry/LayerTile.h:
(LayerTile):
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::processTextureJob):
(WebCore::LayerTiler::performTileJob):
* platform/graphics/blackberry/LayerTiler.h:
(WebCore::LayerTiler::TextureJob::setContents):
(TextureJob):
2013-04-24 Zan Dobersek <zdobersek@igalia.com>
[GTK] Move image decoders, some other GStreamer, Cairo and Soup sources to libPlatform
......@@ -44,11 +44,6 @@ void LayerTile::setContents(BlackBerry::Platform::Graphics::Buffer* contents)
setTexture(textureCacheCompositingThread()->textureForContents(contents));
}
void LayerTile::setContentsToColor(const Color& color)
{
setTexture(textureCacheCompositingThread()->textureForColor(color));
}
void LayerTile::updateContents(BlackBerry::Platform::Graphics::Buffer* contents)
{
setTexture(textureCacheCompositingThread()->updateContents(m_texture, contents));
......
......@@ -27,7 +27,6 @@
namespace WebCore {
class Color;
class IntRect;
class TileIndex;
......@@ -47,7 +46,6 @@ public:
bool hasTexture() const { return m_texture && m_texture->buffer(); }
void setContents(BlackBerry::Platform::Graphics::Buffer*);
void setContentsToColor(const Color&);
void updateContents(BlackBerry::Platform::Graphics::Buffer*);
void discardContents();
......
......@@ -382,11 +382,6 @@ void LayerTiler::processTextureJob(const TextureJob& job, TileJobsMap& tileJobsM
return;
}
if (job.m_type == TextureJob::SetContentsToColor) {
addTileJob(job.m_index, job, tileJobsMap);
return;
}
addTileJob(indexOfTile(job.m_dirtyRect.minXMinYCorner()), job, tileJobsMap);
}
......@@ -413,9 +408,6 @@ void LayerTiler::addTileJob(const TileIndex& index, const TextureJob& job, TileJ
void LayerTiler::performTileJob(LayerTile* tile, const TextureJob& job)
{
switch (job.m_type) {
case TextureJob::SetContentsToColor:
tile->setContentsToColor(job.m_color);
return;
case TextureJob::SetContents:
tile->setContents(job.m_contents);
{
......
......@@ -21,7 +21,6 @@
#if USE(ACCELERATED_COMPOSITING)
#include "Color.h"
#include "FloatRect.h"
#include "IntRect.h"
#include "LayerCompositingThreadClient.h"
......@@ -75,7 +74,7 @@ public:
private:
struct TextureJob {
enum Type { Unknown, SetContents, SetContentsToColor, UpdateContents, DiscardContents, ResizeContents, DirtyContents };
enum Type { Unknown, SetContents, UpdateContents, DiscardContents, ResizeContents, DirtyContents };
TextureJob()
: m_type(Unknown)
......@@ -108,20 +107,10 @@ private:
ASSERT(contents);
}
TextureJob(Type type, const Color& color, const TileIndex& index)
: m_type(type)
, m_contents(0)
, m_color(color)
, m_index(index)
{
ASSERT(type == SetContentsToColor);
}
static TextureJob setContents(BlackBerry::Platform::Graphics::Buffer* contents, const IntRect& contentsRect)
{
return TextureJob(SetContents, contents, contentsRect);
}
static TextureJob setContentsToColor(const Color& color, const TileIndex& index) { return TextureJob(SetContentsToColor, color, index); }
static TextureJob updateContents(BlackBerry::Platform::Graphics::Buffer* contents, const IntRect& dirtyRect) { return TextureJob(UpdateContents, contents, dirtyRect); }
static TextureJob discardContents(const IntRect& dirtyRect) { return TextureJob(DiscardContents, dirtyRect); }
static TextureJob resizeContents(const IntSize& newSize) { return TextureJob(ResizeContents, newSize); }
......@@ -132,7 +121,6 @@ private:
Type m_type;
BlackBerry::Platform::Graphics::Buffer* m_contents;
IntRect m_dirtyRect;
Color m_color;
TileIndex m_index;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment