Commit 4af83d25 authored by eustas's avatar eustas Committed by Commit bot

Fix PDFBrowserTest.Basic crash.

Lock pixels before using them

BUG=446347

Review URL: https://codereview.chromium.org/850043002

Cr-Commit-Position: refs/heads/master@{#311577}
parent 617e94e4
...@@ -26,8 +26,7 @@ namespace { ...@@ -26,8 +26,7 @@ namespace {
// Tests basic PDF rendering. This can be broken depending on bad merges with // Tests basic PDF rendering. This can be broken depending on bad merges with
// the vendor, so it's important that we have basic sanity checking. // the vendor, so it's important that we have basic sanity checking.
// TODO(eustas): This is failing on CROS offical build. crbug.com/446347. #if defined(GOOGLE_CHROME_BUILD) && defined(OS_LINUX)
#if defined(GOOGLE_CHROME_BUILD) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
#define MAYBE_Basic Basic #define MAYBE_Basic Basic
#else #else
#define MAYBE_Basic DISABLED_Basic #define MAYBE_Basic DISABLED_Basic
......
...@@ -133,6 +133,7 @@ void PDFBrowserTest::CopyFromBackingStoreCallback( ...@@ -133,6 +133,7 @@ void PDFBrowserTest::CopyFromBackingStoreCallback(
gfx::PNGCodec::FORMAT_BGRA, &decoded, &w, &h)); gfx::PNGCodec::FORMAT_BGRA, &decoded, &w, &h));
int32* ref_pixels = reinterpret_cast<int32*>(&decoded[0]); int32* ref_pixels = reinterpret_cast<int32*>(&decoded[0]);
SkAutoLockPixels lock_image(bitmap);
int32* pixels = static_cast<int32*>(bitmap.getPixels()); int32* pixels = static_cast<int32*>(bitmap.getPixels());
// Get the background color, and use it to figure out the x-offsets in // Get the background color, and use it to figure out the x-offsets in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment