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

Side by Side Diff: src/core/SkSpriteBlitter_RGB16.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/core/SkSpriteBlitter_ARGB32.cpp ('k') | src/core/SkXfermode.cpp » ('j') | 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 2006 The Android Open Source Project 2 * Copyright 2006 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 8
9 #include "SkSpriteBlitter.h" 9 #include "SkSpriteBlitter.h"
10 #include "SkBlitRow.h" 10 #include "SkBlitRow.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 /////////////////////////////////////////////////////////////////////////////// 300 ///////////////////////////////////////////////////////////////////////////////
301 301
302 SkSpriteBlitter* SkSpriteBlitter::ChooseD16(const SkPixmap& source, const SkPain t& paint, 302 SkSpriteBlitter* SkSpriteBlitter::ChooseD16(const SkPixmap& source, const SkPain t& paint,
303 SkTBlitterAllocator* allocator) { 303 SkTBlitterAllocator* allocator) {
304 304
305 SkASSERT(allocator != nullptr); 305 SkASSERT(allocator != nullptr);
306 306
307 if (paint.getMaskFilter() != nullptr) { // may add cases for this 307 if (paint.getMaskFilter() != nullptr) { // may add cases for this
308 return nullptr; 308 return nullptr;
309 } 309 }
310 if (paint.getXfermode() != nullptr) { // may add cases for this 310 if (!paint.isSrcOver()) { // may add cases for this
311 return nullptr; 311 return nullptr;
312 } 312 }
313 if (paint.getColorFilter() != nullptr) { // may add cases for this 313 if (paint.getColorFilter() != nullptr) { // may add cases for this
314 return nullptr; 314 return nullptr;
315 } 315 }
316 316
317 const SkAlphaType at = source.alphaType(); 317 const SkAlphaType at = source.alphaType();
318 318
319 SkSpriteBlitter* blitter = nullptr; 319 SkSpriteBlitter* blitter = nullptr;
320 unsigned alpha = paint.getAlpha(); 320 unsigned alpha = paint.getAlpha();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } else { 364 } else {
365 blitter = allocator->createT<Sprite_D16_SIndex8A_Blend>(sour ce, alpha); 365 blitter = allocator->createT<Sprite_D16_SIndex8A_Blend>(sour ce, alpha);
366 } 366 }
367 } 367 }
368 break; 368 break;
369 default: 369 default:
370 break; 370 break;
371 } 371 }
372 return blitter; 372 return blitter;
373 } 373 }
OLDNEW
« no previous file with comments | « src/core/SkSpriteBlitter_ARGB32.cpp ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698