From: commit-queue@webkit.org Date: Wed, 18 Jan 2012 03:24:38 +0000 (+0000) Subject: Clear 'm_size' of DrawingBuffer in the 'clear' function X-Git-Tag: 070512121124~15139 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1c64db80cd348d660f8966be37cae8b85293e98;p=profile%2Fivi%2Fwebkit-efl.git Clear 'm_size' of DrawingBuffer in the 'clear' function https://bugs.webkit.org/show_bug.cgi?id=76239 Patch by Yongsheng Zhu on 2012-01-17 Reviewed by Kenneth Russell. Clear the resources of DrawingBuffer but don't clear 'm_size'. This makes 's_currentResourceUsePixels' is not calculated correctly. * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::clear): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105233 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 739c477..b292993 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2012-01-17 Yongsheng Zhu + + Clear 'm_size' of DrawingBuffer in the 'clear' function + https://bugs.webkit.org/show_bug.cgi?id=76239 + + Reviewed by Kenneth Russell. + + Clear the resources of DrawingBuffer but don't clear 'm_size'. This makes + 's_currentResourceUsePixels' is not calculated correctly. + + * platform/graphics/gpu/DrawingBuffer.cpp: + (WebCore::DrawingBuffer::clear): + 2012-01-17 Philip Rogers Fix getBBox for perpendicular paths diff --git a/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp b/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp index d1d2cf2..9dd3b9d 100644 --- a/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp +++ b/Source/WebCore/platform/graphics/gpu/DrawingBuffer.cpp @@ -72,8 +72,10 @@ void DrawingBuffer::clear() return; m_context->makeContextCurrent(); - if (!m_size.isEmpty()) + if (!m_size.isEmpty()) { s_currentResourceUsePixels -= m_size.width() * m_size.height(); + m_size = IntSize(); + } if (m_colorBuffer) { m_context->deleteTexture(m_colorBuffer);