Changeset 149019 in webkit


Ignore:
Timestamp:
Apr 24, 2013 1:09:55 AM (11 years ago)
Author:
anilsson@rim.com
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):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r149018 r149019  
     12013-04-24  Arvid Nilsson  <anilsson@rim.com>
     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
    1312013-04-24  Zan Dobersek  <zdobersek@igalia.com>
    232
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.cpp

    r148192 r149019  
    4343{
    4444    setTexture(textureCacheCompositingThread()->textureForContents(contents));
    45 }
    46 
    47 void LayerTile::setContentsToColor(const Color& color)
    48 {
    49     setTexture(textureCacheCompositingThread()->textureForColor(color));
    5045}
    5146
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerTile.h

    r148192 r149019  
    2828namespace WebCore {
    2929
    30 class Color;
    3130class IntRect;
    3231class TileIndex;
     
    4847
    4948    void setContents(BlackBerry::Platform::Graphics::Buffer*);
    50     void setContentsToColor(const Color&);
    5149    void updateContents(BlackBerry::Platform::Graphics::Buffer*);
    5250    void discardContents();
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.cpp

    r148881 r149019  
    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}
     
    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);
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerTiler.h

    r148192 r149019  
    2222#if USE(ACCELERATED_COMPOSITING)
    2323
    24 #include "Color.h"
    2524#include "FloatRect.h"
    2625#include "IntRect.h"
     
    7675private:
    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()
     
    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); }
     
    133122        BlackBerry::Platform::Graphics::Buffer* m_contents;
    134123        IntRect m_dirtyRect;
    135         Color m_color;
    136124        TileIndex m_index;
    137125    };
Note: See TracChangeset for help on using the changeset viewer.