ImageBuffer's succes flag should be set to false at the very beginning of the c'tor.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2016 22:05:08 +0000 (22:05 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Jul 2016 22:05:08 +0000 (22:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159784

Reviewed by Simon Fraser.

No change in functionality.

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp

index e7d5a4b..8433eda 100644 (file)
@@ -1,3 +1,15 @@
+2016-07-14  Zalan Bujtas  <zalan@apple.com>
+
+        ImageBuffer's succes flag should be set to false at the very beginning of the c'tor.
+        https://bugs.webkit.org/show_bug.cgi?id=159784
+
+        Reviewed by Simon Fraser.
+
+        No change in functionality.
+
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        (WebCore::ImageBuffer::ImageBuffer):
+
 2016-07-14  Alex Christensen  <achristensen@webkit.org>
 
         Use SocketProvider to create SocketStreamHandles
index 30b989d..a96bf0e 100644 (file)
@@ -99,6 +99,7 @@ ImageBuffer::ImageBuffer(const FloatSize& size, float resolutionScale, CGColorSp
     : m_logicalSize(size)
     , m_resolutionScale(resolutionScale)
 {
+    success = false; // Make early return mean failure.
     float scaledWidth = ceilf(resolutionScale * size.width());
     float scaledHeight = ceilf(resolutionScale * size.height());
 
@@ -109,7 +110,6 @@ ImageBuffer::ImageBuffer(const FloatSize& size, float resolutionScale, CGColorSp
     m_size = IntSize(scaledWidth, scaledHeight);
     m_data.backingStoreSize = m_size;
 
-    success = false;  // Make early return mean failure.
     bool accelerateRendering = renderingMode == Accelerated;
     if (m_size.width() <= 0 || m_size.height() <= 0)
         return;