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

Side by Side Diff: tests/ReadPixelsTest.cpp

Issue 227433009: Rename kPMColor_SkColorType to kN32_SkColorType. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 8 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/ImageDecodingTest.cpp ('k') | tests/SerializationTest.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 REPORTER_ASSERT(reporter, bmp.isNull()); 374 REPORTER_ASSERT(reporter, bmp.isNull());
375 } 375 }
376 } 376 }
377 // check the old webkit version of readPixels that clips the 377 // check the old webkit version of readPixels that clips the
378 // bitmap size 378 // bitmap size
379 SkBitmap wkbmp; 379 SkBitmap wkbmp;
380 bool success = canvas.readPixels(srcRect, &wkbmp); 380 bool success = canvas.readPixels(srcRect, &wkbmp);
381 SkIRect clippedRect = DEV_RECT; 381 SkIRect clippedRect = DEV_RECT;
382 if (clippedRect.intersect(srcRect)) { 382 if (clippedRect.intersect(srcRect)) {
383 REPORTER_ASSERT(reporter, success); 383 REPORTER_ASSERT(reporter, success);
384 REPORTER_ASSERT(reporter, kPMColor_SkColorType == wkbmp. colorType()); 384 REPORTER_ASSERT(reporter, kN32_SkColorType == wkbmp.colo rType());
385 REPORTER_ASSERT(reporter, kPremul_SkAlphaType == wkbmp.a lphaType()); 385 REPORTER_ASSERT(reporter, kPremul_SkAlphaType == wkbmp.a lphaType());
386 checkRead(reporter, wkbmp, clippedRect.fLeft, 386 checkRead(reporter, wkbmp, clippedRect.fLeft,
387 clippedRect.fTop, true, false); 387 clippedRect.fTop, true, false);
388 } else { 388 } else {
389 REPORTER_ASSERT(reporter, !success); 389 REPORTER_ASSERT(reporter, !success);
390 } 390 }
391 } 391 }
392 } 392 }
393 } 393 }
394 } 394 }
395 } 395 }
OLDNEW
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698