Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Unified Diff: trunk/src/content/shell/renderer/test_runner/WebTestProxy.cpp

Issue 131443002: Revert 243791 "Revert of https://codereview.chromium.org/128443002/" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | trunk/src/tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/shell/renderer/test_runner/WebTestProxy.cpp
===================================================================
--- trunk/src/content/shell/renderer/test_runner/WebTestProxy.cpp (revision 243836)
+++ trunk/src/content/shell/renderer/test_runner/WebTestProxy.cpp (working copy)
@@ -609,7 +609,7 @@
int pageCount = webFrame->printBegin(pageSizeInPixels);
int totalHeight = pageCount * (pageSizeInPixels.height + 1) - 1;
- SkCanvas* testCanvas = skia::TryCreateBitmapCanvas(pageSizeInPixels.width, totalHeight, true);
+ SkCanvas* testCanvas = skia::TryCreateBitmapCanvas(pageSizeInPixels.width, totalHeight, false);
if (testCanvas) {
discardBackingStore();
m_canvas.reset(testCanvas);
@@ -632,7 +632,10 @@
float deviceScaleFactor = webView()->deviceScaleFactor();
int scaledWidth = static_cast<int>(ceil(static_cast<float>(widgetSize.width) * deviceScaleFactor));
int scaledHeight = static_cast<int>(ceil(static_cast<float>(widgetSize.height) * deviceScaleFactor));
- m_canvas.reset(skia::CreateBitmapCanvas(scaledWidth, scaledHeight, true));
+ // We're allocating the canvas to be non-opaque (third parameter), so we
+ // don't end up with uninitialized memory if a layout test doesn't damage
+ // the entire view.
+ m_canvas.reset(skia::CreateBitmapCanvas(scaledWidth, scaledHeight, false));
return m_canvas.get();
}
« no previous file with comments | « no previous file | trunk/src/tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698