Title: [131930] trunk/Source/WebCore
- Revision
- 131930
- Author
- [email protected]
- Date
- 2012-10-19 12:21:23 -0700 (Fri, 19 Oct 2012)
Log Message
[Chromium] Reduce memory footprint of canvas pattern object with deferred rendering
https://bugs.webkit.org/show_bug.cgi?id=99856
Patch by Justin Novosad <[email protected]> on 2012-10-19
Reviewed by Stephen White.
Marking internal bitmap copy as immutable to prevent it from being
unnecessarily duplicated in skia by SkBitmapHeap.
No new tests: code path already well covered by existing layout tests
fast/canvas/canvas-pattern-*
* platform/graphics/skia/PatternSkia.cpp:
(WebCore::Pattern::platformPattern):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (131929 => 131930)
--- trunk/Source/WebCore/ChangeLog 2012-10-19 19:18:09 UTC (rev 131929)
+++ trunk/Source/WebCore/ChangeLog 2012-10-19 19:21:23 UTC (rev 131930)
@@ -1,3 +1,19 @@
+2012-10-19 Justin Novosad <[email protected]>
+
+ [Chromium] Reduce memory footprint of canvas pattern object with deferred rendering
+ https://bugs.webkit.org/show_bug.cgi?id=99856
+
+ Reviewed by Stephen White.
+
+ Marking internal bitmap copy as immutable to prevent it from being
+ unnecessarily duplicated in skia by SkBitmapHeap.
+
+ No new tests: code path already well covered by existing layout tests
+ fast/canvas/canvas-pattern-*
+
+ * platform/graphics/skia/PatternSkia.cpp:
+ (WebCore::Pattern::platformPattern):
+
2012-10-19 Antti Koivisto <[email protected]>
Maintain a list of active CSS stylesheets
Modified: trunk/Source/WebCore/platform/graphics/skia/PatternSkia.cpp (131929 => 131930)
--- trunk/Source/WebCore/platform/graphics/skia/PatternSkia.cpp 2012-10-19 19:18:09 UTC (rev 131929)
+++ trunk/Source/WebCore/platform/graphics/skia/PatternSkia.cpp 2012-10-19 19:21:23 UTC (rev 131930)
@@ -100,6 +100,7 @@
bm2.eraseARGB(0x00, 0x00, 0x00, 0x00);
SkCanvas canvas(bm2);
canvas.drawBitmap(image->bitmap(), 0, 0);
+ bm2.setImmutable();
m_pattern = SkShader::CreateBitmapShader(bm2, tileModeX, tileModeY);
// Clamp to int, since that's what the adjust function takes.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes