Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: src/opts/opts_check_x86.cpp

Issue 1278253003: Sk4px blit mask. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: note overflow Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/opts/SkOpts_sse2.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
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 "SkBitmapFilter_opts_SSE2.h" 8 #include "SkBitmapFilter_opts_SSE2.h"
9 #include "SkBitmapProcState_opts_SSE2.h" 9 #include "SkBitmapProcState_opts_SSE2.h"
10 #include "SkBitmapProcState_opts_SSSE3.h" 10 #include "SkBitmapProcState_opts_SSSE3.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } else 245 } else
246 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { 246 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
247 return platform_32_procs_SSE2[flags]; 247 return platform_32_procs_SSE2[flags];
248 } else { 248 } else {
249 return NULL; 249 return NULL;
250 } 250 }
251 } 251 }
252 252
253 //////////////////////////////////////////////////////////////////////////////// 253 ////////////////////////////////////////////////////////////////////////////////
254 254
255 SkBlitMask::ColorProc SkBlitMask::PlatformColorProcs(SkColorType dstCT,
256 SkMask::Format maskFormat,
257 SkColor color) {
258 if (SkMask::kA8_Format != maskFormat) {
259 return NULL;
260 }
261
262 ColorProc proc = NULL;
263 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
264 switch (dstCT) {
265 case kN32_SkColorType:
266 // The SSE2 version is not (yet) faster for black, so we check
267 // for that.
268 if (SK_ColorBLACK != color) {
269 proc = SkARGB32_A8_BlitMask_SSE2;
270 }
271 break;
272 default:
273 break;
274 }
275 }
276 return proc;
277 }
278
279 SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) { 255 SkBlitMask::BlitLCD16RowProc SkBlitMask::PlatformBlitRowProcs16(bool isOpaque) {
280 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) { 256 if (supports_simd(SK_CPU_SSE_LEVEL_SSE2)) {
281 if (isOpaque) { 257 if (isOpaque) {
282 return SkBlitLCD16OpaqueRow_SSE2; 258 return SkBlitLCD16OpaqueRow_SSE2;
283 } else { 259 } else {
284 return SkBlitLCD16Row_SSE2; 260 return SkBlitLCD16Row_SSE2;
285 } 261 }
286 } else { 262 } else {
287 return NULL; 263 return NULL;
288 } 264 }
289 265
290 } 266 }
291 267
292 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType, SkMask::Format, Ro wFlags) { 268 SkBlitMask::RowProc SkBlitMask::PlatformRowProcs(SkColorType, SkMask::Format, Ro wFlags) {
293 return NULL; 269 return NULL;
294 } 270 }
OLDNEW
« no previous file with comments | « src/opts/SkOpts_sse2.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698