aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-04-17 11:02:51 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-17 15:33:36 +0000
commit4edb5d219eb99aa1e8fbe5e37260d3b34314e54b (patch)
tree5e9fedc4e0e59db2467a19fe7d4f36030d0d6694 /tests
parent12e946b4bfdf598bffb276776ea6e25439e25265 (diff)
hide lockpixels api behind flag
guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS needs https://codereview.chromium.org/2820873002/# to land first Bug: skia:6481 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09 Reviewed-on: https://skia-review.googlesource.com/13580 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/BitmapCopyTest.cpp3
-rw-r--r--tests/BitmapTest.cpp2
-rw-r--r--tests/BlendTest.cpp2
-rw-r--r--tests/BlurTest.cpp4
-rw-r--r--tests/CodecPartialTest.cpp4
-rw-r--r--tests/CodecTest.cpp7
-rw-r--r--tests/DrawBitmapRectTest.cpp2
-rw-r--r--tests/DrawTextTest.cpp3
-rw-r--r--tests/FontHostStreamTest.cpp3
-rw-r--r--tests/GradientTest.cpp1
-rw-r--r--tests/HighContrastFilterTest.cpp4
-rw-r--r--tests/ImageFilterTest.cpp7
-rw-r--r--tests/ImageFrom565Bitmap.cpp1
-rw-r--r--tests/ImageNewShaderTest.cpp4
-rw-r--r--tests/ImageTest.cpp4
-rw-r--r--tests/ReadPixelsTest.cpp7
-rw-r--r--tests/SerializationTest.cpp2
-rw-r--r--tests/SurfaceTest.cpp1
-rw-r--r--tests/WritePixelsTest.cpp2
19 files changed, 0 insertions, 63 deletions
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index d2fda9e0b7..aadf192285 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -11,7 +11,6 @@
#include "Test.h"
static void init_src(const SkBitmap& bitmap) {
- SkAutoLockPixels lock(bitmap);
if (bitmap.getPixels()) {
if (bitmap.getColorTable()) {
sk_bzero(bitmap.getPixels(), bitmap.getSize());
@@ -130,8 +129,6 @@ DEF_TEST(BitmapCopy_extractSubset, reporter) {
REPORTER_ASSERT(reporter, copy.height() == 2);
if (gPairs[i].fColorType == gPairs[j].fColorType) {
- SkAutoLockPixels alp0(subset);
- SkAutoLockPixels alp1(copy);
// they should both have, or both not-have, a colortable
bool hasCT = subset.getColorTable() != nullptr;
REPORTER_ASSERT(reporter, (copy.getColorTable() != nullptr) == hasCT);
diff --git a/tests/BitmapTest.cpp b/tests/BitmapTest.cpp
index 76621e6b38..0d4b785231 100644
--- a/tests/BitmapTest.cpp
+++ b/tests/BitmapTest.cpp
@@ -141,8 +141,6 @@ DEF_TEST(Bitmap_getColor_Swizzle, r) {
ERRORF(r, "SkBitmap::copy failed %d", (int)ct);
continue;
}
- SkAutoLockPixels autoLockPixels1(copy);
- SkAutoLockPixels autoLockPixels2(source);
REPORTER_ASSERT(r, source.getColor(0, 0) == copy.getColor(0, 0));
}
}
diff --git a/tests/BlendTest.cpp b/tests/BlendTest.cpp
index 8f688e2d69..0acbd07957 100644
--- a/tests/BlendTest.cpp
+++ b/tests/BlendTest.cpp
@@ -187,7 +187,6 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ES2BlendWithNoTexture, reporter, ctxInfo)
SkBitmap bitmap;
REPORTER_ASSERT(reporter, bitmap.tryAllocPixels(SkImageInfo::Make(
kWidth, kHeight, kColorType, kPremul_SkAlphaType)));
- bitmap.lockPixels();
REPORTER_ASSERT(
reporter,
surface->readPixels(bitmap.info(), bitmap.getPixels(), bitmap.rowBytes(), 0, 0));
@@ -199,7 +198,6 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ES2BlendWithNoTexture, reporter, ctxInfo)
SkColorSetRGB(0x80, 0xFF, 0x80));
// Clean up - surface depends on backingSurface and must be released first.
- bitmap.unlockPixels();
surface.reset();
backingSurface.reset();
}
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp
index 985917f1c0..5d957185bb 100644
--- a/tests/BlurTest.cpp
+++ b/tests/BlurTest.cpp
@@ -76,9 +76,6 @@ static bool compare(const SkBitmap& ref, const SkIRect& iref,
const int xOff = itest.fLeft - iref.fLeft;
const int yOff = itest.fTop - iref.fTop;
- SkAutoLockPixels alpRef(ref);
- SkAutoLockPixels alpTest(test);
-
for (int y = 0; y < test.height(); ++y) {
for (int x = 0; x < test.width(); ++x) {
SkColor testColor = test.getColor(x, y);
@@ -244,7 +241,6 @@ static void readback(SkCanvas* canvas, int* result, int resultCount) {
readback.allocN32Pixels(resultCount, 30);
canvas->readPixels(readback, 0, 0);
- readback.lockPixels();
SkPMColor* pixels = (SkPMColor*) readback.getAddr32(0, 15);
for (int i = 0; i < resultCount; ++i) {
diff --git a/tests/CodecPartialTest.cpp b/tests/CodecPartialTest.cpp
index f5eea371d9..20cd1d11f0 100644
--- a/tests/CodecPartialTest.cpp
+++ b/tests/CodecPartialTest.cpp
@@ -277,10 +277,6 @@ DEF_TEST(Codec_partialAnim, r) {
frameInfo = partialCodec->getFrameInfo();
REPORTER_ASSERT(r, frameInfo.size() == i + 1);
REPORTER_ASSERT(r, frameInfo[i].fFullyReceived);
-
- // allocPixels locked the pixels for frame, but frames[i] was copied
- // from another bitmap, and did not retain the locked status.
- SkAutoLockPixels alp(frames[i]);
compare_bitmaps(r, frames[i], frame);
}
}
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 2c601fadb0..ceafa15cb1 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -38,7 +38,6 @@
#endif
static void md5(const SkBitmap& bm, SkMD5::Digest* digest) {
- SkAutoLockPixels autoLockPixels(bm);
SkASSERT(bm.getPixels());
SkMD5 md5;
size_t rowLen = bm.info().bytesPerPixel() * bm.width();
@@ -72,7 +71,6 @@ static void test_info(skiatest::Reporter* r, Codec* codec, const SkImageInfo& in
SkCodec::Result expectedResult, const SkMD5::Digest* goodDigest) {
SkBitmap bm;
bm.allocPixels(info);
- SkAutoLockPixels autoLockPixels(bm);
SkCodec::Result result = codec->getPixels(info, bm.getPixels(), bm.rowBytes());
REPORTER_ASSERT(r, result == expectedResult);
@@ -98,7 +96,6 @@ static void test_incremental_decode(skiatest::Reporter* r, SkCodec* codec, const
const SkMD5::Digest& goodDigest) {
SkBitmap bm;
bm.allocPixels(info);
- SkAutoLockPixels autoLockPixels(bm);
REPORTER_ASSERT(r, SkCodec::kSuccess == codec->startIncrementalDecode(info, bm.getPixels(),
bm.rowBytes()));
@@ -157,7 +154,6 @@ static void test_codec(skiatest::Reporter* r, Codec* codec, SkBitmap& bm, const
REPORTER_ASSERT(r, info.dimensions() == size);
bm.allocPixels(info);
- SkAutoLockPixels autoLockPixels(bm);
SkCodec::Result result = codec->getPixels(info, bm.getPixels(), bm.rowBytes());
REPORTER_ASSERT(r, result == expectedResult);
@@ -174,7 +170,6 @@ static void test_codec(skiatest::Reporter* r, Codec* codec, SkBitmap& bm, const
// Decoding to 565 should succeed.
SkBitmap bm565;
bm565.allocPixels(info565);
- SkAutoLockPixels alp(bm565);
// This will allow comparison even if the image is incomplete.
bm565.eraseColor(SK_ColorBLACK);
@@ -199,7 +194,6 @@ static void test_codec(skiatest::Reporter* r, Codec* codec, SkBitmap& bm, const
SkImageInfo grayInfo = codec->getInfo();
SkBitmap grayBm;
grayBm.allocPixels(grayInfo);
- SkAutoLockPixels alp(grayBm);
grayBm.eraseColor(SK_ColorBLACK);
@@ -442,7 +436,6 @@ static void check(skiatest::Reporter* r,
SkCodecImageGenerator::MakeFromEncodedCodec(fullData));
SkBitmap bm;
bm.allocPixels(info);
- SkAutoLockPixels autoLockPixels(bm);
REPORTER_ASSERT(r, gen->getPixels(info, bm.getPixels(), bm.rowBytes()));
compare_to_good_digest(r, codecDigest, bm);
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index df410b2b00..991290142e 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -226,8 +226,6 @@ static void test_nan_antihair() {
}
static bool check_for_all_zeros(const SkBitmap& bm) {
- SkAutoLockPixels alp(bm);
-
size_t count = bm.width() * bm.bytesPerPixel();
for (int y = 0; y < bm.height(); y++) {
const uint8_t* ptr = reinterpret_cast<const uint8_t*>(bm.getAddr(0, y));
diff --git a/tests/DrawTextTest.cpp b/tests/DrawTextTest.cpp
index bf9bd39f8d..a98b36f321 100644
--- a/tests/DrawTextTest.cpp
+++ b/tests/DrawTextTest.cpp
@@ -37,9 +37,6 @@ static bool compare(const SkBitmap& ref, const SkIRect& iref,
const int xOff = itest.fLeft - iref.fLeft;
const int yOff = itest.fTop - iref.fTop;
- SkAutoLockPixels alpRef(ref);
- SkAutoLockPixels alpTest(test);
-
for (int y = 0; y < test.height(); ++y) {
for (int x = 0; x < test.width(); ++x) {
SkColor testColor = test.getColor(x, y);
diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp
index 7c4cb67b00..2bb439b791 100644
--- a/tests/FontHostStreamTest.cpp
+++ b/tests/FontHostStreamTest.cpp
@@ -39,9 +39,6 @@ static bool compare(const SkBitmap& ref, const SkIRect& iref,
const int xOff = itest.fLeft - iref.fLeft;
const int yOff = itest.fTop - iref.fTop;
- SkAutoLockPixels alpRef(ref);
- SkAutoLockPixels alpTest(test);
-
for (int y = 0; y < test.height(); ++y) {
for (int x = 0; x < test.width(); ++x) {
SkColor testColor = test.getColor(x, y);
diff --git a/tests/GradientTest.cpp b/tests/GradientTest.cpp
index e46bfb46c6..ec2753dc96 100644
--- a/tests/GradientTest.cpp
+++ b/tests/GradientTest.cpp
@@ -149,7 +149,6 @@ static void TestConstantGradient(skiatest::Reporter*) {
outBitmap.allocN32Pixels(10, 1);
SkCanvas canvas(outBitmap);
canvas.drawPaint(paint);
- SkAutoLockPixels alp(outBitmap);
for (int i = 0; i < 10; i++) {
// The following is commented out because it currently fails
// Related bug: https://code.google.com/p/skia/issues/detail?id=1098
diff --git a/tests/HighContrastFilterTest.cpp b/tests/HighContrastFilterTest.cpp
index 35b0c9febd..26f1a7c1f4 100644
--- a/tests/HighContrastFilterTest.cpp
+++ b/tests/HighContrastFilterTest.cpp
@@ -33,8 +33,6 @@ DEF_TEST(HighContrastFilter_FilterImage, reporter) {
paint.setColorFilter(SkHighContrastFilter::Make(config));
canvasFilter.drawRect(r, paint);
- paintResult.lockPixels();
- filterResult.lockPixels();
for (int y = r.top(); y < r.bottom(); ++y) {
for (int x = r.left(); x < r.right(); ++x) {
SkColor paintColor = paintResult.getColor(x, y);
@@ -44,8 +42,6 @@ DEF_TEST(HighContrastFilter_FilterImage, reporter) {
paint.getColorFilter()->filterColor(paintColor));
}
}
- paintResult.unlockPixels();
- filterResult.unlockPixels();
}
DEF_TEST(HighContrastFilter_SanityCheck, reporter) {
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 79f34f7654..5d959d16dd 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -594,10 +594,6 @@ static void test_negative_blur_sigma(skiatest::Reporter* reporter,
REPORTER_ASSERT(reporter, negativeResult1->getROPixels(&negativeResultBM1));
REPORTER_ASSERT(reporter, negativeResult2->getROPixels(&negativeResultBM2));
- SkAutoLockPixels lockP1(positiveResultBM1);
- SkAutoLockPixels lockP2(positiveResultBM2);
- SkAutoLockPixels lockN1(negativeResultBM1);
- SkAutoLockPixels lockN2(negativeResultBM2);
for (int y = 0; y < height; y++) {
int diffs = memcmp(positiveResultBM1.getAddr32(0, y),
negativeResultBM1.getAddr32(0, y),
@@ -656,7 +652,6 @@ static void test_zero_blur_sigma(skiatest::Reporter* reporter, GrContext* contex
REPORTER_ASSERT(reporter, result->getROPixels(&resultBM));
- SkAutoLockPixels lock(resultBM);
for (int y = 0; y < resultBM.height(); y++) {
for (int x = 0; x < resultBM.width(); x++) {
bool diff = *resultBM.getAddr32(x, y) != SK_ColorGREEN;
@@ -696,7 +691,6 @@ static void test_fail_affects_transparent_black(skiatest::Reporter* reporter, Gr
if (result.get()) {
SkBitmap resultBM;
REPORTER_ASSERT(reporter, result->getROPixels(&resultBM));
- SkAutoLockPixels lock(resultBM);
REPORTER_ASSERT(reporter, *resultBM.getAddr32(0, 0) == SK_ColorGREEN);
}
}
@@ -1573,7 +1567,6 @@ static void test_composed_imagefilter_bounds(skiatest::Reporter* reporter, GrCon
SkBitmap resultBM;
REPORTER_ASSERT(reporter, result->getROPixels(&resultBM));
- SkAutoLockPixels lock(resultBM);
REPORTER_ASSERT(reporter, resultBM.getColor(50, 50) == SK_ColorGREEN);
}
diff --git a/tests/ImageFrom565Bitmap.cpp b/tests/ImageFrom565Bitmap.cpp
index fada9f0b62..53f65df269 100644
--- a/tests/ImageFrom565Bitmap.cpp
+++ b/tests/ImageFrom565Bitmap.cpp
@@ -14,7 +14,6 @@ DEF_TEST(ImageFrom565Bitmap, r) {
SkBitmap bm;
bm.allocPixels(SkImageInfo::Make(
5, 7, kRGB_565_SkColorType, kOpaque_SkAlphaType));
- SkAutoLockPixels autoLockPixels(bm);
bm.eraseColor(SK_ColorBLACK);
REPORTER_ASSERT(r, SkImage::MakeFromBitmap(bm) != nullptr);
}
diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp
index 37e1e301ee..fe01f04c94 100644
--- a/tests/ImageNewShaderTest.cpp
+++ b/tests/ImageNewShaderTest.cpp
@@ -17,9 +17,6 @@
#endif
static void test_bitmap_equality(skiatest::Reporter* reporter, SkBitmap& bm1, SkBitmap& bm2) {
- SkAutoLockPixels lockBm1(bm1);
- SkAutoLockPixels lockBm2(bm2);
-
REPORTER_ASSERT(reporter, bm1.getSize() == bm2.getSize());
REPORTER_ASSERT(reporter, 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.getSize()));
}
@@ -90,7 +87,6 @@ static void run_shader_test(skiatest::Reporter* reporter, SkSurface* sourceSurfa
// Test correctness
{
- SkAutoLockPixels lockBm(bmt);
for (int y = 0; y < info.height(); y++) {
REPORTER_ASSERT(reporter, 0xFFFF0000 == bmt.getColor(0, y));
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 22004a07c6..77017f3885 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -691,7 +691,6 @@ static void check_legacy_bitmap(skiatest::Reporter* reporter, const SkImage* ima
REPORTER_ASSERT(reporter, bitmap.isImmutable());
}
- SkAutoLockPixels alp(bitmap);
REPORTER_ASSERT(reporter, bitmap.getPixels());
const SkImageInfo info = SkImageInfo::MakeN32(1, 1, bitmap.alphaType());
@@ -1065,7 +1064,6 @@ DEF_TEST(Image_makeColorSpace, r) {
SkBitmap p3Bitmap;
bool success = p3Image->asLegacyBitmap(&p3Bitmap, SkImage::kRO_LegacyBitmapMode);
REPORTER_ASSERT(r, success);
- p3Bitmap.lockPixels();
REPORTER_ASSERT(r, almost_equal(0x28, SkGetPackedR32(*p3Bitmap.getAddr32(0, 0))));
REPORTER_ASSERT(r, almost_equal(0x40, SkGetPackedG32(*p3Bitmap.getAddr32(0, 0))));
REPORTER_ASSERT(r, almost_equal(0x5E, SkGetPackedB32(*p3Bitmap.getAddr32(0, 0))));
@@ -1075,7 +1073,6 @@ DEF_TEST(Image_makeColorSpace, r) {
SkBitmap adobeBitmap;
success = adobeImage->asLegacyBitmap(&adobeBitmap, SkImage::kRO_LegacyBitmapMode);
REPORTER_ASSERT(r, success);
- adobeBitmap.lockPixels();
REPORTER_ASSERT(r, almost_equal(0x21, SkGetPackedR32(*adobeBitmap.getAddr32(0, 0))));
REPORTER_ASSERT(r, almost_equal(0x31, SkGetPackedG32(*adobeBitmap.getAddr32(0, 0))));
REPORTER_ASSERT(r, almost_equal(0x4C, SkGetPackedB32(*adobeBitmap.getAddr32(0, 0))));
@@ -1084,7 +1081,6 @@ DEF_TEST(Image_makeColorSpace, r) {
p3Image = srgbImage->makeColorSpace(p3, SkTransferFunctionBehavior::kIgnore);
success = p3Image->asLegacyBitmap(&p3Bitmap, SkImage::kRO_LegacyBitmapMode);
REPORTER_ASSERT(r, success);
- p3Bitmap.lockPixels();
REPORTER_ASSERT(r, almost_equal(0x8B, SkGetPackedR32(*p3Bitmap.getAddr32(0, 0))));
REPORTER_ASSERT(r, almost_equal(0x82, SkGetPackedG32(*p3Bitmap.getAddr32(0, 0))));
REPORTER_ASSERT(r, almost_equal(0x77, SkGetPackedB32(*p3Bitmap.getAddr32(0, 0))));
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index 697d3ee99e..89706ac5c0 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -124,7 +124,6 @@ static void fill_src_canvas(SkCanvas* canvas) {
}
static void fill_dst_bmp_with_init_data(SkBitmap* bitmap) {
- SkAutoLockPixels alp(*bitmap);
int w = bitmap->width();
int h = bitmap->height();
intptr_t pixels = reinterpret_cast<intptr_t>(bitmap->getPixels());
@@ -184,7 +183,6 @@ static bool check_read(skiatest::Reporter* reporter,
if (!clippedSrcRect.intersect(srcRect)) {
clippedSrcRect.setEmpty();
}
- SkAutoLockPixels alp(bitmap);
if (kAlpha_8_SkColorType == ct) {
for (int by = 0; by < bh; ++by) {
for (int bx = 0; bx < bw; ++bx) {
@@ -440,11 +438,9 @@ static void test_readpixels_texture(skiatest::Reporter* reporter,
if (gReadPixelsConfigs[c].fAlphaType == kUnpremul_SkAlphaType) {
flags = GrContextPriv::kUnpremul_PixelOpsFlag;
}
- bmp.lockPixels();
bool success = sContext->readPixels(bmp.info(), bmp.getPixels(),
bmp.rowBytes(),
srcRect.fLeft, srcRect.fTop, flags);
- bmp.unlockPixels();
check_read(reporter, bmp, srcRect.fLeft, srcRect.fTop,
success, true,
gReadPixelsConfigs[c].fColorType, gReadPixelsConfigs[c].fAlphaType);
@@ -458,7 +454,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
SkBitmap bmp = make_src_bitmap();
- bmp.lockPixels();
// On the GPU we will also try reading back from a non-renderable texture.
for (auto origin : {kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin}) {
@@ -481,8 +476,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, ctxInfo) {
test_readpixels_texture(reporter, std::move(sContext));
}
}
-
- bmp.unlockPixels();
}
#endif
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index 3de422b969..10aec539fa 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -318,8 +318,6 @@ static void compare_bitmaps(skiatest::Reporter* reporter,
const SkBitmap& b1, const SkBitmap& b2) {
REPORTER_ASSERT(reporter, b1.width() == b2.width());
REPORTER_ASSERT(reporter, b1.height() == b2.height());
- SkAutoLockPixels autoLockPixels1(b1);
- SkAutoLockPixels autoLockPixels2(b2);
if ((b1.width() != b2.width()) ||
(b1.height() != b2.height())) {
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index f620cff996..e236928da7 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -912,7 +912,6 @@ static void test_overdraw_surface(skiatest::Reporter* r, SkSurface* surface) {
SkBitmap bitmap;
image->asLegacyBitmap(&bitmap, SkImage::kRO_LegacyBitmapMode);
- bitmap.lockPixels();
for (int y = 0; y < 10; y++) {
for (int x = 0; x < 10; x++) {
REPORTER_ASSERT(r, 1 == SkGetPackedA32(*bitmap.getAddr32(x, y)));
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index bf2e64efc1..f5cdddccd0 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -196,7 +196,6 @@ static bool check_write(skiatest::Reporter* reporter, SkCanvas* canvas, const Sk
return false;
}
- SkAutoLockPixels alp(secretDevBitmap);
canvasRowBytes = secretDevBitmap.rowBytes();
canvasPixels = static_cast<const uint32_t*>(secretDevBitmap.getPixels());
@@ -279,7 +278,6 @@ static bool setup_bitmap(SkBitmap* bm, SkColorType ct, SkAlphaType at, int w, in
if (!alloc_row_bytes(bm, info, rowBytes)) {
return false;
}
- SkAutoLockPixels alp(*bm);
for (int y = 0; y < h; ++y) {
for (int x = 0; x < w; ++x) {
*bm->getAddr32(x, y) = get_bitmap_color(x, y, w, ct, at);