Unreviewed, rolling out r120501.
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 20:09:31 +0000 (20:09 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jun 2012 20:09:31 +0000 (20:09 +0000)
http://trac.webkit.org/changeset/120501
https://bugs.webkit.org/show_bug.cgi?id=89126

[skia] Fix is too heavy-handed

* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::drawNeedsCopy):
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::PlatformContextSkia):
* platform/graphics/skia/PlatformContextSkia.h:
(PlatformContextSkia):
(WebCore::PlatformContextSkia::isDeferred):
(WebCore::PlatformContextSkia::setDeferred):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121283 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
Source/WebCore/platform/graphics/skia/PlatformContextSkia.h

index 8bf4558..9cad67a 100644 (file)
@@ -3596,6 +3596,8 @@ BUGWK86592 LINUX : http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html
 BUGWK86592 LINUX : fast/loader/unload-form-about-blank.html = TIMEOUT PASS
 BUGWK86592 LINUX : http/tests/xmlhttprequest/zero-length-response-sync.html = TIMEOUT PASS
 
+BUGWK89126 : platform/chromium/compositing/accelerated-drawing/svg-filters.html = IMAGE
+
 // strange "Unexpected no expected results found" on cr-linux ews
 BUGWK86600 LINUX : http/tests/cache/loaded-from-cache-after-reload-within-iframe.html = MISSING PASS
 BUGWK86600 LINUX : http/tests/cache/loaded-from-cache-after-reload.html = MISSING PASS
index 4e3d943..819eeb7 100755 (executable)
@@ -1,3 +1,20 @@
+2012-06-26  James Robinson  <jamesr@chromium.org>
+
+        Unreviewed, rolling out r120501.
+        http://trac.webkit.org/changeset/120501
+        https://bugs.webkit.org/show_bug.cgi?id=89126
+
+        [skia] Fix is too heavy-handed
+
+        * platform/graphics/skia/ImageBufferSkia.cpp:
+        (WebCore::drawNeedsCopy):
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::PlatformContextSkia):
+        * platform/graphics/skia/PlatformContextSkia.h:
+        (PlatformContextSkia):
+        (WebCore::PlatformContextSkia::isDeferred):
+        (WebCore::PlatformContextSkia::setDeferred):
+
 2012-06-26  Julien Chaffraix  <jchaffraix@webkit.org>
 
         Crash in FixedTableLayout::layout
index ee8b922..ac3d929 100644 (file)
@@ -202,12 +202,7 @@ void ImageBuffer::clip(GraphicsContext* context, const FloatRect& rect) const
 
 static bool drawNeedsCopy(GraphicsContext* src, GraphicsContext* dst)
 {
-    if (src == dst)
-        return true;
-    // If we're rendering into a deferred canvas, we need to make a deep copy of the source pixels because Skia does not
-    // retain a reference to the actual pixels otherwise. We check if we're drawing into a deferred canvas by seeing if the
-    // device's bitmap configuration is set or not - if it's not, then we must not have a bitmap target yet.
-    return dst->platformContext()->canvas()->getDevice()->config() == SkBitmap::kNo_Config;
+    return dst->platformContext()->isDeferred() || src == dst;
 }
 
 void ImageBuffer::draw(GraphicsContext* context, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
index e2e180b..74a4f38 100644 (file)
@@ -186,6 +186,7 @@ PlatformContextSkia::PlatformContextSkia(SkCanvas* canvas)
     , m_trackOpaqueRegion(false)
     , m_printing(false)
     , m_accelerated(false)
+    , m_deferred(false)
     , m_drawingToImageBuffer(false)
 {
     m_stateStack.append(State());
index 1c85ec9..b9fcb7b 100644 (file)
@@ -186,6 +186,12 @@ public:
     bool isAccelerated() const { return m_accelerated; }
     void setAccelerated(bool accelerated) { m_accelerated = accelerated; }
 
+    // True if this context is deferring draw calls to be executed later.
+    // We need to know this for context-to-context draws, in order to know if
+    // the source bitmap needs to be copied.
+    bool isDeferred() const { return m_deferred; }
+    void setDeferred(bool deferred) { m_deferred = deferred; }
+
     void setTrackOpaqueRegion(bool track) { m_trackOpaqueRegion = track; }
 
     // This will be an empty region unless tracking is enabled.
@@ -235,6 +241,7 @@ private:
     FloatSize m_imageResamplingHintDstSize;
     bool m_printing;
     bool m_accelerated;
+    bool m_deferred;
     bool m_drawingToImageBuffer;
 };