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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkImageInfo.h" | 10 #include "SkImageInfo.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 | 90 |
91 SkAutoTUnref<SkImage> image(new_u64_image(bm, u64_flags)); | 91 SkAutoTUnref<SkImage> image(new_u64_image(bm, u64_flags)); |
92 canvas->drawImage(image, r.left(), r.top(), nullptr); | 92 canvas->drawImage(image, r.left(), r.top(), nullptr); |
93 } | 93 } |
94 | 94 |
95 /* | 95 /* |
96 * Test SkXfer4fProcs directly for src-over, comparing them to current SkColor
blits. | 96 * Test SkXfer4fProcs directly for src-over, comparing them to current SkColor
blits. |
97 */ | 97 */ |
98 DEF_SIMPLE_GM(xfer_u64_srcover, canvas, 580, 760) { | 98 DEF_SIMPLE_GM(xfer_u64_srcover, canvas, 580, 760) { |
99 return; // disable for now, until we understand the failures on Nexus 5 etc. | |
100 | |
101 const int IW = 50; | 99 const int IW = 50; |
102 const SkScalar W = IW; | 100 const SkScalar W = IW; |
103 const SkScalar H = 100; | 101 const SkScalar H = 100; |
104 | 102 |
105 const int32_t flags[] = { | 103 const int32_t flags[] = { |
106 -1, // normal | 104 -1, // normal |
107 0, // U16 components | 105 0, // U16 components |
108 SkXfermode::kDstIsFloat16_U64Flag, // F16 components | 106 SkXfermode::kDstIsFloat16_U64Flag, // F16 components |
109 }; | 107 }; |
110 const SkColor colors[] = { | 108 const SkColor colors[] = { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 } | 140 } |
143 canvas->translate(W + 20, 0); | 141 canvas->translate(W + 20, 0); |
144 } | 142 } |
145 canvas->restore(); | 143 canvas->restore(); |
146 canvas->translate(0, H + 20); | 144 canvas->translate(0, H + 20); |
147 } | 145 } |
148 canvas->restore(); | 146 canvas->restore(); |
149 canvas->translate(0, (H + 20) * SK_ARRAY_COUNT(flags) + 20); | 147 canvas->translate(0, (H + 20) * SK_ARRAY_COUNT(flags) + 20); |
150 } | 148 } |
151 } | 149 } |
OLD | NEW |