| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright 2016 Google Inc. |    2  * Copyright 2016 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 "SkBlitter.h" |    9 #include "SkBlitter.h" | 
|   10 #include "SkCanvas.h" |   10 #include "SkCanvas.h" | 
|   11 #include "SkColor.h" |   11 #include "SkColor.h" | 
|   12 #include "SkImage.h" |   12 #include "SkImage.h" | 
|   13 #include "SkImageInfo.h" |   13 #include "SkImageInfo.h" | 
|   14 #include "SkLinearBitmapPipeline.h" |   14 #include "SkLinearBitmapPipeline.h" | 
|   15 #include "SkXfermode.h" |   15 #include "SkXfermode.h" | 
|   16 #include "SkPM4fPriv.h" |   16 #include "SkPM4fPriv.h" | 
|   17 #include "SkShader.h" |   17 #include "SkShader.h" | 
|   18 #include "SkBitmapProcShader.h" |  | 
|   19  |   18  | 
|   20 static void fill_in_bits(SkBitmap& bm, SkIRect ir, SkColor c, bool premul) { |   19 static void fill_in_bits(SkBitmap& bm, SkIRect ir, SkColor c, bool premul) { | 
|   21     bm.allocN32Pixels(ir.width(), ir.height()); |   20     bm.allocN32Pixels(ir.width(), ir.height()); | 
|   22     SkPixmap pm; |   21     SkPixmap pm; | 
|   23     bm.peekPixels(&pm); |   22     bm.peekPixels(&pm); | 
|   24  |   23  | 
|   25     SkPMColor b = SkColorSetARGBMacro(255, 0, 0, 0); |   24     SkPMColor b = SkColorSetARGBMacro(255, 0, 0, 0); | 
|   26     SkPMColor w; |   25     SkPMColor w; | 
|   27     if (premul) { |   26     if (premul) { | 
|   28         w = SkPreMultiplyColor(c); |   27         w = SkPreMultiplyColor(c); | 
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  196             } |  195             } | 
|  197             canvas->restore(); |  196             canvas->restore(); | 
|  198             canvas->translate(0, H + 20); |  197             canvas->translate(0, H + 20); | 
|  199         } |  198         } | 
|  200         canvas->restore(); |  199         canvas->restore(); | 
|  201         canvas->translate(0, (H + 20) * SK_ARRAY_COUNT(mats)); |  200         canvas->translate(0, (H + 20) * SK_ARRAY_COUNT(mats)); | 
|  202         if (useBilerp) break; |  201         if (useBilerp) break; | 
|  203         useBilerp = true; |  202         useBilerp = true; | 
|  204     } |  203     } | 
|  205 } |  204 } | 
| OLD | NEW |