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

Side by Side Diff: tests/DrawBitmapRectTest.cpp

Issue 27382002: return false if we can't scale, to force us to try to lock the original and then proceed (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 canvas.drawBitmapRect(src, &srcR, dstR, NULL); 316 canvas.drawBitmapRect(src, &srcR, dstR, NULL);
317 317
318 // ensure that we draw nothing if srcR does not intersect the bitmap 318 // ensure that we draw nothing if srcR does not intersect the bitmap
319 REPORTER_ASSERT(reporter, check_for_all_zeros(dst)); 319 REPORTER_ASSERT(reporter, check_for_all_zeros(dst));
320 320
321 test_nan_antihair(); 321 test_nan_antihair();
322 test_giantrepeat_crbug118018(reporter); 322 test_giantrepeat_crbug118018(reporter);
323 323
324 test_treatAsSprite(reporter); 324 test_treatAsSprite(reporter);
325 325 test_faulty_pixelref(reporter);
326 if (false) { // will enable when fix lands
327 test_faulty_pixelref(reporter);
328 }
329 } 326 }
330 327
331 #include "TestClassDef.h" 328 #include "TestClassDef.h"
332 DEFINE_TESTCLASS("DrawBitmapRect", TestDrawBitmapRectClass, TestDrawBitmapRect) 329 DEFINE_TESTCLASS("DrawBitmapRect", TestDrawBitmapRectClass, TestDrawBitmapRect)
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698