| OLD | NEW | 
|    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 "SkBitmap.h" |    8 #include "SkBitmap.h" | 
|    9 #include "SkCanvas.h" |    9 #include "SkCanvas.h" | 
|   10 #include "SkData.h" |   10 #include "SkData.h" | 
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  188     } |  188     } | 
|  189     bm.eraseColor(SK_ColorRED); |  189     bm.eraseColor(SK_ColorRED); | 
|  190  |  190  | 
|  191     matrix.setAll(0.0078740157f, |  191     matrix.setAll(0.0078740157f, | 
|  192                   0, |  192                   0, | 
|  193                   SkIntToScalar(249), |  193                   SkIntToScalar(249), | 
|  194                   0, |  194                   0, | 
|  195                   0.0078740157f, |  195                   0.0078740157f, | 
|  196                   SkIntToScalar(239), |  196                   SkIntToScalar(239), | 
|  197                   0, 0, SK_Scalar1); |  197                   0, 0, SK_Scalar1); | 
|  198     SkShader* s = SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode, |  | 
|  199                                                SkShader::kRepeat_TileMode, &matr
     ix); |  | 
|  200  |  | 
|  201     SkPaint paint; |  198     SkPaint paint; | 
|  202     paint.setShader(s)->unref(); |  199     paint.setShader(SkShader::MakeBitmapShader(bm, SkShader::kRepeat_TileMode, | 
 |  200                                                SkShader::kRepeat_TileMode, &matr
     ix)); | 
|  203  |  201  | 
|  204     SkRect r = SkRect::MakeXYWH(681, 239, 695, 253); |  202     SkRect r = SkRect::MakeXYWH(681, 239, 695, 253); | 
|  205     c.drawRect(r, paint); |  203     c.drawRect(r, paint); | 
|  206  |  204  | 
|  207     assert_ifDrawnTo(reporter, dev, shouldBeDrawn); |  205     assert_ifDrawnTo(reporter, dev, shouldBeDrawn); | 
|  208 } |  206 } | 
|  209  |  207  | 
|  210 /* |  208 /* | 
|  211  *  Original bug was asserting that the matrix-proc had generated a (Y) value |  209  *  Original bug was asserting that the matrix-proc had generated a (Y) value | 
|  212  *  that was out of range. This led (in the release build) to the sampler-proc |  210  *  that was out of range. This led (in the release build) to the sampler-proc | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  305  |  303  | 
|  306     // ensure that we draw nothing if srcR does not intersect the bitmap |  304     // ensure that we draw nothing if srcR does not intersect the bitmap | 
|  307     REPORTER_ASSERT(reporter, check_for_all_zeros(dst)); |  305     REPORTER_ASSERT(reporter, check_for_all_zeros(dst)); | 
|  308  |  306  | 
|  309     test_nan_antihair(); |  307     test_nan_antihair(); | 
|  310     test_giantrepeat_crbug118018(reporter); |  308     test_giantrepeat_crbug118018(reporter); | 
|  311  |  309  | 
|  312     test_treatAsSprite(reporter); |  310     test_treatAsSprite(reporter); | 
|  313     test_faulty_pixelref(reporter); |  311     test_faulty_pixelref(reporter); | 
|  314 } |  312 } | 
| OLD | NEW |