| 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 "gm.h" | 8 #include "gm.h" |
| 9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
| 10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
| 11 #include "SkColorPriv.h" | 11 #include "SkColorPriv.h" |
| 12 #include "SkGradientShader.h" | 12 #include "SkGradientShader.h" |
| 13 #include "SkImage.h" | 13 #include "SkImage.h" |
| 14 #include "SkImage_Base.h" | 14 #include "SkImage_Base.h" |
| 15 #include "SkMathPriv.h" | 15 #include "SkMathPriv.h" |
| 16 #include "SkShader.h" | 16 #include "SkShader.h" |
| 17 #include "SkSurface.h" | 17 #include "SkSurface.h" |
| 18 | 18 |
| 19 #if SK_SUPPORT_GPU | 19 #if SK_SUPPORT_GPU |
| 20 #include "SkGr.h" | 20 #include "SkGrPriv.h" |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 static SkBitmap make_chessbm(int w, int h) { | 23 static SkBitmap make_chessbm(int w, int h) { |
| 24 SkBitmap bm; | 24 SkBitmap bm; |
| 25 bm.allocN32Pixels(w, h); | 25 bm.allocN32Pixels(w, h); |
| 26 | 26 |
| 27 for (int y = 0; y < bm.height(); y++) { | 27 for (int y = 0; y < bm.height(); y++) { |
| 28 uint32_t* p = bm.getAddr32(0, y); | 28 uint32_t* p = bm.getAddr32(0, y); |
| 29 for (int x = 0; x < bm.width(); x++) { | 29 for (int x = 0; x < bm.width(); x++) { |
| 30 p[x] = ((x + y) & 1) ? SK_ColorWHITE : SK_ColorBLACK; | 30 p[x] = ((x + y) & 1) ? SK_ColorWHITE : SK_ColorBLACK; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 canvas->drawBitmapRect(bm, srcRect, dstRect, &paint); | 220 canvas->drawBitmapRect(bm, srcRect, dstRect, &paint); |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 | 223 |
| 224 private: | 224 private: |
| 225 typedef skiagm::GM INHERITED; | 225 typedef skiagm::GM INHERITED; |
| 226 }; | 226 }; |
| 227 | 227 |
| 228 DEF_GM( return new DrawBitmapRectGM(canvasproc, nullptr); ) | 228 DEF_GM( return new DrawBitmapRectGM(canvasproc, nullptr); ) |
| 229 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); ) | 229 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); ) |
| OLD | NEW |