| OLD | NEW |
| 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 "SampleCode.h" | 8 #include "SampleCode.h" |
| 9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
| 10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "SkColorPriv.h" | 22 #include "SkColorPriv.h" |
| 23 #include "SkColorFilter.h" | 23 #include "SkColorFilter.h" |
| 24 #include "SkTime.h" | 24 #include "SkTime.h" |
| 25 #include "SkTypeface.h" | 25 #include "SkTypeface.h" |
| 26 #include "SkView.h" | 26 #include "SkView.h" |
| 27 | 27 |
| 28 #include "SkOSFile.h" | 28 #include "SkOSFile.h" |
| 29 #include "SkStream.h" | 29 #include "SkStream.h" |
| 30 | 30 |
| 31 static void check_for_nonwhite(const SkBitmap& bm, int alpha) { | 31 static void check_for_nonwhite(const SkBitmap& bm, int alpha) { |
| 32 if (bm.config() != SkBitmap::kRGB_565_Config) { | 32 if (bm.colorType() != kRGB_565_SkColorType) { |
| 33 return; | 33 return; |
| 34 } | 34 } |
| 35 | 35 |
| 36 for (int y = 0; y < bm.height(); y++) { | 36 for (int y = 0; y < bm.height(); y++) { |
| 37 for (int x = 0; x < bm.width(); x++) { | 37 for (int x = 0; x < bm.width(); x++) { |
| 38 uint16_t c = *bm.getAddr16(x, y); | 38 uint16_t c = *bm.getAddr16(x, y); |
| 39 if (c != 0xFFFF) { | 39 if (c != 0xFFFF) { |
| 40 SkDebugf("------ nonwhite alpha=%x [%d %d] %x\n", alpha, x, y, c
); | 40 SkDebugf("------ nonwhite alpha=%x [%d %d] %x\n", alpha, x, y, c
); |
| 41 return; | 41 return; |
| 42 } | 42 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 private: | 114 private: |
| 115 int fByte; | 115 int fByte; |
| 116 | 116 |
| 117 typedef SampleView INHERITED; | 117 typedef SampleView INHERITED; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 ////////////////////////////////////////////////////////////////////////////// | 120 ////////////////////////////////////////////////////////////////////////////// |
| 121 | 121 |
| 122 static SkView* MyFactory() { return new TextAlphaView; } | 122 static SkView* MyFactory() { return new TextAlphaView; } |
| 123 static SkViewRegister reg(MyFactory); | 123 static SkViewRegister reg(MyFactory); |
| OLD | NEW |