Title: [141131] trunk/Source/WebCore
Revision
141131
Author
hc...@chromium.org
Date
2013-01-29 10:16:03 -0800 (Tue, 29 Jan 2013)

Log Message

[chromium] Unreviewed build fix.

Revert my revert at 141033 which can cause deadlock.

* platform/graphics/chromium/DiscardablePixelRef.cpp:
(WebCore::DiscardablePixelRefAllocator::allocPixelRef):
(WebCore::DiscardablePixelRef::DiscardablePixelRef):
* platform/graphics/chromium/DiscardablePixelRef.h:
(DiscardablePixelRef):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141130 => 141131)


--- trunk/Source/WebCore/ChangeLog	2013-01-29 18:09:36 UTC (rev 141130)
+++ trunk/Source/WebCore/ChangeLog	2013-01-29 18:16:03 UTC (rev 141131)
@@ -1,3 +1,15 @@
+2013-01-29  Alpha Lam  <hc...@chromium.org>
+
+        [chromium] Unreviewed build fix.
+
+        Revert my revert at 141033 which can cause deadlock.
+
+        * platform/graphics/chromium/DiscardablePixelRef.cpp:
+        (WebCore::DiscardablePixelRefAllocator::allocPixelRef):
+        (WebCore::DiscardablePixelRef::DiscardablePixelRef):
+        * platform/graphics/chromium/DiscardablePixelRef.h:
+        (DiscardablePixelRef):
+
 2013-01-29  Joshua Bell  <jsb...@chromium.org>
 
         [Chromium] IndexedDB: Let callers specify reason (error) for aborting transaction
@@ -1230,18 +1242,6 @@
         * xml/XSLTProcessor.idl:
         Add exceptions to binding integrity checks to IDL.
         
-2013-01-28  Alpha Lam  <hc...@chromium.org>
-
-        [chromium] Build fix.
-
-        Unreviewed build fix. Remove the use of SkMutex from DiscardablePixelRef.
-
-        * platform/graphics/chromium/DiscardablePixelRef.cpp:
-        (WebCore::DiscardablePixelRefAllocator::allocPixelRef):
-        (WebCore::DiscardablePixelRef::DiscardablePixelRef):
-        * platform/graphics/chromium/DiscardablePixelRef.h:
-        (DiscardablePixelRef):
-
 2013-01-28  Benjamin Poulain  <benja...@webkit.org>
 
         String constructed from Literals should be non-empty

Modified: trunk/Source/WebCore/platform/graphics/chromium/DiscardablePixelRef.cpp (141130 => 141131)


--- trunk/Source/WebCore/platform/graphics/chromium/DiscardablePixelRef.cpp	2013-01-29 18:09:36 UTC (rev 141130)
+++ trunk/Source/WebCore/platform/graphics/chromium/DiscardablePixelRef.cpp	2013-01-29 18:16:03 UTC (rev 141131)
@@ -45,7 +45,7 @@
     if (size.isNeg() || !size.is32())
         return false;
 
-    SkAutoTUnref<DiscardablePixelRef> pixelRef(new DiscardablePixelRef(ctable));
+    SkAutoTUnref<DiscardablePixelRef> pixelRef(new DiscardablePixelRef(ctable, adoptPtr(new SkMutex())));
     if (pixelRef->allocAndLockDiscardableMemory(size.get32())) {
         pixelRef->setURI(labelDiscardable);
         dst->setPixelRef(pixelRef.get());
@@ -61,9 +61,11 @@
     return dst->allocPixels(ctable);
 }
 
-DiscardablePixelRef::DiscardablePixelRef(SkColorTable* ctable)
-    : m_colorTable(ctable)
+DiscardablePixelRef::DiscardablePixelRef(SkColorTable* ctable, PassOwnPtr<SkMutex> mutex)
+    : SkPixelRef(mutex.get())
+    , m_colorTable(ctable)
     , m_lockedMemory(0)
+    , m_mutex(mutex)
 {
 }
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/DiscardablePixelRef.h (141130 => 141131)


--- trunk/Source/WebCore/platform/graphics/chromium/DiscardablePixelRef.h	2013-01-29 18:09:36 UTC (rev 141130)
+++ trunk/Source/WebCore/platform/graphics/chromium/DiscardablePixelRef.h	2013-01-29 18:16:03 UTC (rev 141131)
@@ -46,7 +46,7 @@
 // PixelRef object whose memory can be discarded when pixels are unlocked.
 class DiscardablePixelRef : public SkPixelRef {
 public:
-    DiscardablePixelRef(SkColorTable*);
+    DiscardablePixelRef(SkColorTable*, PassOwnPtr<SkMutex>);
     ~DiscardablePixelRef();
 
     static bool isDiscardable(SkPixelRef*);
@@ -63,6 +63,7 @@
     SkColorTable* m_colorTable;
     void* m_lockedMemory;
     OwnPtr<WebKit::WebDiscardableMemory> m_discardable;
+    OwnPtr<SkMutex> m_mutex;
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to