- Revision
- 149019
- Author
- anils...@rim.com
- Date
- 2013-04-24 01:09:55 -0700 (Wed, 24 Apr 2013)
Log Message
[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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (149018 => 149019)
--- trunk/Source/WebCore/ChangeLog 2013-04-24 07:43:11 UTC (rev 149018)
+++ trunk/Source/WebCore/ChangeLog 2013-04-24 08:09:55 UTC (rev 149019)
@@ -1,3 +1,33 @@
+2013-04-24 Arvid Nilsson <anils...@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 <zdober...@igalia.com>
[GTK] Move image decoders, some other GStreamer, Cairo and Soup sources to libPlatform
Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.cpp (149018 => 149019)
--- trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.cpp 2013-04-24 07:43:11 UTC (rev 149018)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.cpp 2013-04-24 08:09:55 UTC (rev 149019)
@@ -44,11 +44,6 @@
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));
Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.h (149018 => 149019)
--- trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.h 2013-04-24 07:43:11 UTC (rev 149018)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.h 2013-04-24 08:09:55 UTC (rev 149019)
@@ -27,7 +27,6 @@
namespace WebCore {
-class Color;
class IntRect;
class TileIndex;
@@ -47,7 +46,6 @@
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();
Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp (149018 => 149019)
--- trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp 2013-04-24 07:43:11 UTC (rev 149018)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp 2013-04-24 08:09:55 UTC (rev 149019)
@@ -382,11 +382,6 @@
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::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);
{
Modified: trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.h (149018 => 149019)
--- trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.h 2013-04-24 07:43:11 UTC (rev 149018)
+++ trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.h 2013-04-24 08:09:55 UTC (rev 149019)
@@ -21,7 +21,6 @@
#if USE(ACCELERATED_COMPOSITING)
-#include "Color.h"
#include "FloatRect.h"
#include "IntRect.h"
#include "LayerCompositingThreadClient.h"
@@ -75,7 +74,7 @@
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 @@
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 @@
Type m_type;
BlackBerry::Platform::Graphics::Buffer* m_contents;
IntRect m_dirtyRect;
- Color m_color;
TileIndex m_index;
};