OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "DMSrcSink.h" | 8 #include "DMSrcSink.h" |
9 #include "SamplePipeControllers.h" | 9 #include "SamplePipeControllers.h" |
10 #include "SkCodec.h" | 10 #include "SkCodec.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 * may be faster for other types of images. Since this is a
correctness test | 267 * may be faster for other types of images. Since this is a
correctness test |
268 * that's okay. | 268 * that's okay. |
269 */ | 269 */ |
270 char* bufferRow = buffer; | 270 char* bufferRow = buffer; |
271 for (int subsetY = 0; subsetY < currentSubsetHeight; ++subse
tY) { | 271 for (int subsetY = 0; subsetY < currentSubsetHeight; ++subse
tY) { |
272 memcpy(subsetBm.getAddr(0, subsetY), bufferRow + x*bpp, | 272 memcpy(subsetBm.getAddr(0, subsetY), bufferRow + x*bpp, |
273 currentSubsetWidth*bpp); | 273 currentSubsetWidth*bpp); |
274 bufferRow += rowBytes; | 274 bufferRow += rowBytes; |
275 } | 275 } |
276 | 276 |
| 277 subsetBm.notifyPixelsChanged(); |
277 canvas->drawBitmap(subsetBm, SkIntToScalar(x), SkIntToScalar
(y)); | 278 canvas->drawBitmap(subsetBm, SkIntToScalar(x), SkIntToScalar
(y)); |
278 } | 279 } |
279 } | 280 } |
280 break; | 281 break; |
281 } | 282 } |
282 case kStripe_Mode: { | 283 case kStripe_Mode: { |
283 const int height = decodeInfo.height(); | 284 const int height = decodeInfo.height(); |
284 // This value is chosen arbitrarily. We exercise more cases by choo
sing a value that | 285 // This value is chosen arbitrarily. We exercise more cases by choo
sing a value that |
285 // does not align with image blocks. | 286 // does not align with image blocks. |
286 const int stripeHeight = 37; | 287 const int stripeHeight = 37; |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 skr.visit<void>(i, drawsAsSingletonPictures); | 1067 skr.visit<void>(i, drawsAsSingletonPictures); |
1067 } | 1068 } |
1068 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); | 1069 SkAutoTUnref<SkPicture> macroPic(macroRec.endRecordingAsPicture()); |
1069 | 1070 |
1070 canvas->drawPicture(macroPic); | 1071 canvas->drawPicture(macroPic); |
1071 return ""; | 1072 return ""; |
1072 }); | 1073 }); |
1073 } | 1074 } |
1074 | 1075 |
1075 } // namespace DM | 1076 } // namespace DM |
OLD | NEW |