Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1641)

Unified Diff: Source/core/platform/graphics/GraphicsContext.h

Issue 23643003: ImageBuffer-less SVG masking and clipping. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the Win build. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/graphics/GraphicsContext.h
diff --git a/Source/core/platform/graphics/GraphicsContext.h b/Source/core/platform/graphics/GraphicsContext.h
index b91c7e6b60245eea6e9bd9aba3b6a6773bac7b68..cc1978441351b563bbe9ed4bc6dbf876741fab20 100644
--- a/Source/core/platform/graphics/GraphicsContext.h
+++ b/Source/core/platform/graphics/GraphicsContext.h
@@ -195,6 +195,8 @@ public:
AnnotationModeFlags annotationMode() const { return m_annotationMode; }
void setAnnotationMode(const AnnotationModeFlags mode) { m_annotationMode = mode; }
+
+ void setColorSpaceConversion(ColorSpace srcColorSpace, ColorSpace dstColorSpace);
// ---------- End state management methods -----------------
// Get the contents of the image buffer
@@ -278,7 +280,6 @@ public:
void clipOutRoundedRect(const RoundedRect&);
void clipPath(const Path&, WindRule = RULE_EVENODD);
void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true);
- void clipToImageBuffer(const ImageBuffer*, const FloatRect&);
bool clipRect(const SkRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op = SkRegion::kIntersect_Op);
void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&);
@@ -293,8 +294,9 @@ public:
};
void drawLineForDocumentMarker(const FloatPoint&, float width, DocumentMarkerLineStyle);
- void beginTransparencyLayer(float opacity);
- void endTransparencyLayer();
+ void beginTransparencyLayer(float opacity, const FloatRect* = 0);
+ void beginMaskedLayer(const FloatRect&, MaskType = AlphaMaskType);
+ void endLayer();
bool hasShadow() const;
void setShadow(const FloatSize& offset, float blur, const Color&,
@@ -408,11 +410,6 @@ private:
bool concat(const SkMatrix&);
- // Used when restoring and the state has an image clip. Only shows the pixels in
- // m_canvas that are also in imageBuffer.
- // The clipping rectangle is given in absolute coordinates.
- void applyClipFromImage(const SkRect&, const SkBitmap&);
-
// common code between setupPaintFor[Filling,Stroking]
void setupShader(SkPaint*, Gradient*, Pattern*, SkColor) const;
@@ -450,7 +447,7 @@ private:
#if !ASSERT_DISABLED
unsigned m_annotationCount;
- unsigned m_transparencyCount;
+ unsigned m_layerCount;
#endif
// Tracks the region painted opaque via the GraphicsContext.
OpaqueRegionSkia m_opaqueRegion;
« no previous file with comments | « Source/core/platform/graphics/CrossfadeGeneratedImage.cpp ('k') | Source/core/platform/graphics/GraphicsContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698