Changeset 86264 in webkit


Ignore:
Timestamp:
May 11, 2011 2:02:58 PM (13 years ago)
Author:
noam.rosenthal@nokia.com
Message:

2011-05-11 Noam Rosenthal <noam.rosenthal@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

[Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
https://bugs.webkit.org/show_bug.cgi?id=60439

Patch 1/12: Change the TextureMapperPlatformLayer API to allow a 3D-context or a
media player to decide how to paint into the TextureMapper, rather than mandate specific
types of platform layers.

No new tests. Tests in LayoutTests/compositing test this.

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/texmap/TextureMapperPlatformLayer.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86262 r86264  
     12011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
     6        https://bugs.webkit.org/show_bug.cgi?id=60439
     7
     8        Patch 1/12: Change the TextureMapperPlatformLayer API to allow a 3D-context or a
     9        media player to decide how to paint into the TextureMapper, rather than mandate specific
     10        types of platform layers.
     11
     12        No new tests. Tests in LayoutTests/compositing test this.
     13
     14        * platform/graphics/GraphicsLayer.h:
     15        * platform/graphics/texmap/TextureMapperPlatformLayer.h:
     16
    1172011-05-11  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.h

    r81242 r86264  
    4141#include <wtf/PassOwnPtr.h>
    4242
    43 #if USE(TEXTURE_MAPPER)
    44 #include "texmap/TextureMapperPlatformLayer.h"
    45 #endif
    46 
    4743#if PLATFORM(MAC)
    4844#ifdef __OBJC__
  • trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h

    r82199 r86264  
    2121#define TextureMapperPlatformLayer_h
    2222
     23#include "FloatRect.h"
     24#include "TransformationMatrix.h"
     25
    2326namespace WebCore {
    2427
    25 class GraphicsContext;
    26 class IntRect;
    27 class IntSize;
    2828class TextureMapper;
    29 class TransformationMatrix;
    30 
    31 
    32 // Glue layer to connect the texmap layer to the platform specific container.
    33 class TextureMapperLayerClient {
    34 public:
    35     virtual ~TextureMapperLayerClient() {}
    36     virtual void setNeedsDisplay() = 0;
    37     virtual void setNeedsDisplayInRect(const IntRect& rect) = 0;
    38     virtual void setSizeChanged(const IntSize&) = 0;
    39     virtual TextureMapper* textureMapper() = 0;
    40 };
     29class BitmapTexture;
    4130
    4231class TextureMapperPlatformLayer {
    4332public:
    44     enum Type {
    45         ContentLayer,
    46         MediaLayer
    47     };
    48 
    49     virtual Type layerType() const = 0;
    50     virtual ~TextureMapperPlatformLayer() {}
     33    virtual void paintToTextureMapper(TextureMapper*, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0, BitmapTexture* mask = 0) const = 0;
    5134};
    5235
    53 class TextureMapperContentLayer : public TextureMapperPlatformLayer {
    54 public:
    55     struct PaintOptions {
    56         IntRect visibleRect;
    57         IntRect targetRect;
    58         IntSize viewportSize;
    59         TransformationMatrix transform;
    60         float opacity;
    61     };
    62 
    63     virtual void setPlatformLayerClient(TextureMapperLayerClient*) = 0;
    64     virtual void paint(TextureMapper*, const PaintOptions&) {}
    65     virtual IntSize size() const = 0;
    66     virtual Type layerType() const { return ContentLayer; }
    6736};
    6837
    69 class TextureMapperMediaLayer : public TextureMapperPlatformLayer {
    70 public:
    71     virtual void paint(GraphicsContext*) = 0;
    72     virtual Type layerType() const { return MediaLayer; }
    73 };
    74 
    75 }
    76 
    7738#endif // TextureMapperPlatformLayer_h
Note: See TracChangeset for help on using the changeset viewer.