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

Side by Side Diff: tests/IndexedPngOverflowTest.cpp

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « tests/ImageTest.cpp ('k') | tests/PathTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "CodecPriv.h" 8 #include "CodecPriv.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 15 matching lines...) Expand all
26 0x99, 0xe3, 0x92, 0xa0, 0xf2, 0xdf, 0x3d, 0x7b, 0x0d, 0xda, 0x04, 0x1c, 26 0x99, 0xe3, 0x92, 0xa0, 0xf2, 0xdf, 0x3d, 0x7b, 0x0d, 0xda, 0x04, 0x1c,
27 0x03, 0xad, 0x00, 0x38, 0x5c, 0x2e, 0xad, 0x12, 0x00, 0x00, 0x00, 0x00, 27 0x03, 0xad, 0x00, 0x38, 0x5c, 0x2e, 0xad, 0x12, 0x00, 0x00, 0x00, 0x00,
28 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82 28 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
29 }; 29 };
30 30
31 DEF_TEST(IndexedPngOverflow, reporter) { 31 DEF_TEST(IndexedPngOverflow, reporter) {
32 SkBitmap image; 32 SkBitmap image;
33 bool success = decode_memory(gPng, sizeof(gPng), &image); 33 bool success = decode_memory(gPng, sizeof(gPng), &image);
34 REPORTER_ASSERT(reporter, success); 34 REPORTER_ASSERT(reporter, success);
35 35
36 SkAutoTUnref<SkSurface> surface(SkSurface::NewRaster(SkImageInfo::MakeN32Pre mul(20, 1))); 36 auto surface(SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(20, 1)));
37 SkCanvas* canvas = surface->getCanvas(); 37 SkCanvas* canvas = surface->getCanvas();
38 SkRect destRect = SkRect::MakeXYWH(0, 0, 20, 1); 38 SkRect destRect = SkRect::MakeXYWH(0, 0, 20, 1);
39 canvas->drawBitmapRect(image, destRect, nullptr); 39 canvas->drawBitmapRect(image, destRect, nullptr);
40 } 40 }
OLDNEW
« no previous file with comments | « tests/ImageTest.cpp ('k') | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698