Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit a7583c0

Browse files
[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
1 parent 30ce27e commit a7583c0

File tree

5 files changed

+31
-28
lines changed

5 files changed

+31
-28
lines changed

Source/WebCore/ChangeLog

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
2013-04-24 Arvid Nilsson <[email protected]>
2+
3+
[BlackBerry] Remove the setContentsToColor flavor of LayerTiler::TextureJob
4+
https://bugs.webkit.org/show_bug.cgi?id=115092
5+
6+
Reviewed by Carlos Garcia Campos.
7+
8+
With the Skia backend, we had an optimization to detect solid color
9+
layers. The Skia code has been purged, but these bits remained. With
10+
BlackBerry::Platform::Graphics::PlatformGraphicsContext, only the solid
11+
color will be drawn anyway, so we don't need to detect such layers at
12+
the WebCore level. Fixed by removing the setContentsToColor flavor of
13+
LayerTiler::TextureJob.
14+
15+
BlackBerry::WebKit::WebOverlay still uses
16+
TextureCacheCompositingThread::textureForColor() so that one can stay
17+
for now.
18+
19+
This was dead code so no new tests.
20+
21+
* platform/graphics/blackberry/LayerTile.cpp:
22+
* platform/graphics/blackberry/LayerTile.h:
23+
(LayerTile):
24+
* platform/graphics/blackberry/LayerTiler.cpp:
25+
(WebCore::LayerTiler::processTextureJob):
26+
(WebCore::LayerTiler::performTileJob):
27+
* platform/graphics/blackberry/LayerTiler.h:
28+
(WebCore::LayerTiler::TextureJob::setContents):
29+
(TextureJob):
30+
131
2013-04-24 Zan Dobersek <[email protected]>
232

333
[GTK] Move image decoders, some other GStreamer, Cairo and Soup sources to libPlatform

Source/WebCore/platform/graphics/blackberry/LayerTile.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ void LayerTile::setContents(BlackBerry::Platform::Graphics::Buffer* contents)
4444
setTexture(textureCacheCompositingThread()->textureForContents(contents));
4545
}
4646

47-
void LayerTile::setContentsToColor(const Color& color)
48-
{
49-
setTexture(textureCacheCompositingThread()->textureForColor(color));
50-
}
51-
5247
void LayerTile::updateContents(BlackBerry::Platform::Graphics::Buffer* contents)
5348
{
5449
setTexture(textureCacheCompositingThread()->updateContents(m_texture, contents));

Source/WebCore/platform/graphics/blackberry/LayerTile.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
namespace WebCore {
2929

30-
class Color;
3130
class IntRect;
3231
class TileIndex;
3332

@@ -47,7 +46,6 @@ class LayerTile {
4746
bool hasTexture() const { return m_texture && m_texture->buffer(); }
4847

4948
void setContents(BlackBerry::Platform::Graphics::Buffer*);
50-
void setContentsToColor(const Color&);
5149
void updateContents(BlackBerry::Platform::Graphics::Buffer*);
5250
void discardContents();
5351

Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,6 @@ void LayerTiler::processTextureJob(const TextureJob& job, TileJobsMap& tileJobsM
382382
return;
383383
}
384384

385-
if (job.m_type == TextureJob::SetContentsToColor) {
386-
addTileJob(job.m_index, job, tileJobsMap);
387-
return;
388-
}
389-
390385
addTileJob(indexOfTile(job.m_dirtyRect.minXMinYCorner()), job, tileJobsMap);
391386
}
392387

@@ -413,9 +408,6 @@ void LayerTiler::addTileJob(const TileIndex& index, const TextureJob& job, TileJ
413408
void LayerTiler::performTileJob(LayerTile* tile, const TextureJob& job)
414409
{
415410
switch (job.m_type) {
416-
case TextureJob::SetContentsToColor:
417-
tile->setContentsToColor(job.m_color);
418-
return;
419411
case TextureJob::SetContents:
420412
tile->setContents(job.m_contents);
421413
{

Source/WebCore/platform/graphics/blackberry/LayerTiler.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#if USE(ACCELERATED_COMPOSITING)
2323

24-
#include "Color.h"
2524
#include "FloatRect.h"
2625
#include "IntRect.h"
2726
#include "LayerCompositingThreadClient.h"
@@ -75,7 +74,7 @@ class LayerTiler : public ThreadSafeRefCounted<LayerTiler>, public LayerComposit
7574

7675
private:
7776
struct TextureJob {
78-
enum Type { Unknown, SetContents, SetContentsToColor, UpdateContents, DiscardContents, ResizeContents, DirtyContents };
77+
enum Type { Unknown, SetContents, UpdateContents, DiscardContents, ResizeContents, DirtyContents };
7978

8079
TextureJob()
8180
: m_type(Unknown)
@@ -108,20 +107,10 @@ class LayerTiler : public ThreadSafeRefCounted<LayerTiler>, public LayerComposit
108107
ASSERT(contents);
109108
}
110109

111-
TextureJob(Type type, const Color& color, const TileIndex& index)
112-
: m_type(type)
113-
, m_contents(0)
114-
, m_color(color)
115-
, m_index(index)
116-
{
117-
ASSERT(type == SetContentsToColor);
118-
}
119-
120110
static TextureJob setContents(BlackBerry::Platform::Graphics::Buffer* contents, const IntRect& contentsRect)
121111
{
122112
return TextureJob(SetContents, contents, contentsRect);
123113
}
124-
static TextureJob setContentsToColor(const Color& color, const TileIndex& index) { return TextureJob(SetContentsToColor, color, index); }
125114
static TextureJob updateContents(BlackBerry::Platform::Graphics::Buffer* contents, const IntRect& dirtyRect) { return TextureJob(UpdateContents, contents, dirtyRect); }
126115
static TextureJob discardContents(const IntRect& dirtyRect) { return TextureJob(DiscardContents, dirtyRect); }
127116
static TextureJob resizeContents(const IntSize& newSize) { return TextureJob(ResizeContents, newSize); }
@@ -132,7 +121,6 @@ class LayerTiler : public ThreadSafeRefCounted<LayerTiler>, public LayerComposit
132121
Type m_type;
133122
BlackBerry::Platform::Graphics::Buffer* m_contents;
134123
IntRect m_dirtyRect;
135-
Color m_color;
136124
TileIndex m_index;
137125
};
138126

0 commit comments

Comments
 (0)