WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Proposed patch
bug-54365-v2.diff (text/plain), 2.85 KB, created by
Andreas Kling
on 2011-02-14 12:53:24 PST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Andreas Kling
Created:
2011-02-14 12:53:24 PST
Size:
2.85 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ba2247a..d575c92 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2011-02-14 Andreas Kling <kling@webkit.org> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ GraphicsContext: Add clip(IntRect) overload for Qt >+ https://bugs.webkit.org/show_bug.cgi?id=54365 >+ >+ Qt has special code paths for clipping to integer rectangles. >+ Add a GraphicsContext::clip() overload to allow us to take >+ advantage of the optimized code. >+ >+ * platform/graphics/GraphicsContext.cpp: >+ (WebCore::GraphicsContext::clip): >+ * platform/graphics/GraphicsContext.h: >+ * platform/graphics/qt/GraphicsContextQt.cpp: >+ (WebCore::GraphicsContext::clip): >+ > 2011-02-13 Nico Weber <thakis@chromium.org> > > Reviewed by Anders Carlsson. >diff --git a/Source/WebCore/platform/graphics/GraphicsContext.cpp b/Source/WebCore/platform/graphics/GraphicsContext.cpp >index 16efa70..2d0bd1e 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContext.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsContext.cpp >@@ -550,6 +550,13 @@ void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorS > image->draw(this, styleColorSpace, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), op, useLowQualityScale); > } > >+#if !PLATFORM(QT) >+void GraphicsContext::clip(const IntRect& rect) >+{ >+ clip(FloatRect(rect)); >+} >+#endif >+ > void GraphicsContext::addRoundedRectClip(const RoundedIntRect& rect) > { > if (paintingDisabled()) >diff --git a/Source/WebCore/platform/graphics/GraphicsContext.h b/Source/WebCore/platform/graphics/GraphicsContext.h >index ad5cedc..7695051 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContext.h >+++ b/Source/WebCore/platform/graphics/GraphicsContext.h >@@ -321,6 +321,7 @@ namespace WebCore { > void setImageInterpolationQuality(InterpolationQuality); > InterpolationQuality imageInterpolationQuality() const; > >+ void clip(const IntRect&); > void clip(const FloatRect&); > void addRoundedRectClip(const RoundedIntRect&); > void addInnerRoundedRectClip(const IntRect&, int thickness); >diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp >index bf2826c..38cdd26 100644 >--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp >+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp >@@ -769,6 +769,14 @@ ContextShadow* GraphicsContext::contextShadow() > return &m_data->shadow; > } > >+void GraphicsContext::clip(const IntRect& rect) >+{ >+ if (paintingDisabled()) >+ return; >+ >+ m_data->p()->setClipRect(rect, Qt::IntersectClip); >+} >+ > void GraphicsContext::clip(const FloatRect& rect) > { > if (paintingDisabled())
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 54365
:
82278
| 82354