Title: [135809] trunk/Source/WebCore
- Revision
- 135809
- Author
- senorbla...@chromium.org
- Date
- 2012-11-26 20:09:46 -0800 (Mon, 26 Nov 2012)
Log Message
[Chromium] Shared graphics context should only pushGroupMarker() once
https://bugs.webkit.org/show_bug.cgi?id=103082
Reviewed by James Robinson.
GraphicsContext3D's pushGroupMarkerEXT() is being called every time
an ImageBuffer is created, leading to unlimited memory growth, since
they share a common GraphicsContext3D. It should be called only once,
on context creation.
Tested by manually checking the memory usage in Chrome's TaskManager.
(Sorry, I can't think of a way to test this automatically.)
* platform/graphics/gpu/SharedGraphicsContext3D.cpp:
(WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::createAcceleratedCanvas):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (135808 => 135809)
--- trunk/Source/WebCore/ChangeLog 2012-11-27 04:08:51 UTC (rev 135808)
+++ trunk/Source/WebCore/ChangeLog 2012-11-27 04:09:46 UTC (rev 135809)
@@ -1,3 +1,23 @@
+2012-11-26 Stephen White <senorbla...@chromium.org>
+
+ [Chromium] Shared graphics context should only pushGroupMarker() once
+ https://bugs.webkit.org/show_bug.cgi?id=103082
+
+ Reviewed by James Robinson.
+
+ GraphicsContext3D's pushGroupMarkerEXT() is being called every time
+ an ImageBuffer is created, leading to unlimited memory growth, since
+ they share a common GraphicsContext3D. It should be called only once,
+ on context creation.
+
+ Tested by manually checking the memory usage in Chrome's TaskManager.
+ (Sorry, I can't think of a way to test this automatically.)
+
+ * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
+ (WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::createAcceleratedCanvas):
+
2012-11-26 Kentaro Hara <hara...@chromium.org>
[V8] Remove WorkerContextExecutionProxy.{h,cpp}
Modified: trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp (135808 => 135809)
--- trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp 2012-11-27 04:08:51 UTC (rev 135808)
+++ trunk/Source/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp 2012-11-27 04:09:46 UTC (rev 135809)
@@ -42,12 +42,19 @@
if (m_context && (!m_context->makeContextCurrent() || (m_context->getExtensions()->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR)))
m_context.clear();
- if (!m_context)
+ bool wasCreated = false;
+
+ if (!m_context) {
createContext();
+ wasCreated = true;
+ }
if (m_context && !m_context->makeContextCurrent())
m_context.clear();
+ if (m_context && wasCreated)
+ m_context->getExtensions()->pushGroupMarkerEXT("SharedGraphicsContext");
+
return m_context;
}
Modified: trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (135808 => 135809)
--- trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2012-11-27 04:08:51 UTC (rev 135808)
+++ trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2012-11-27 04:09:46 UTC (rev 135809)
@@ -79,7 +79,6 @@
GrContext* gr = context3D->grContext();
if (!gr)
return 0;
- context3D->getExtensions()->pushGroupMarkerEXT("AcceleratedCanvasContext");
gr->resetContext();
GrTextureDesc desc;
desc.fFlags = kRenderTarget_GrTextureFlagBit;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes