| Index: third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h
|
| ===================================================================
|
| --- third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h (revision 8367)
|
| +++ third_party/WebKit/WebCore/platform/graphics/skia/PlatformContextSkia.h (working copy)
|
| @@ -73,9 +73,28 @@
|
| // to the constructor.
|
| void setCanvas(skia::PlatformCanvas*);
|
|
|
| +#if PLATFORM(WIN_OS)
|
| + // If false we're rendering to a GraphicsContext for a web page, if false
|
| + // we're not (as is the case when rendering to a canvas object).
|
| + // If this is true the contents have not been marked up with the magic
|
| + // color and all text drawing needs to go to a layer so that the alpha is
|
| + // correctly updated.
|
| + void setDrawingToImageBuffer(bool value);
|
| + bool isDrawingToImageBuffer() const;
|
| +#endif
|
| +
|
| void save();
|
| void restore();
|
|
|
| + // Begins a layer that is clipped to the image |imageBuffer| at the location
|
| + // |rect|. This layer is implicitly restored when the next restore is
|
| + // invoked.
|
| + // NOTE: |imageBuffer| may be deleted before the |restore| is invoked.
|
| +#if defined(__linux__) || PLATFORM(WIN_OS)
|
| + void beginLayerClippedToImage(const WebCore::FloatRect& rect,
|
| + const WebCore::ImageBuffer* imageBuffer);
|
| +#endif
|
| +
|
| // Sets up the common flags on a paint for antialiasing, effects, etc.
|
| // This is implicitly called by setupPaintFill and setupPaintStroke, but
|
| // you may wish to call it directly sometimes if you don't want that other
|
| @@ -149,6 +168,12 @@
|
| #endif
|
|
|
| private:
|
| +#if defined(__linux__) || PLATFORM(WIN_OS)
|
| + // Used when restoring and the state has an image clip. Only shows the pixels in
|
| + // m_canvas that are also in imageBuffer.
|
| + void applyClipFromImage(const WebCore::FloatRect& rect, const SkBitmap& imageBuffer);
|
| +#endif
|
| +
|
| // Defines drawing style.
|
| struct State;
|
|
|
| @@ -169,6 +194,10 @@
|
| // A pointer to a GDK Drawable wrapping of this Skia canvas
|
| GdkSkia* m_gdkskia;
|
| #endif
|
| +
|
| +#if PLATFORM(WIN_OS)
|
| + bool m_drawingToImageBuffer;
|
| +#endif
|
| };
|
|
|
| #endif // PlatformContextSkia_h
|
|
|