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

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

Issue 303543009: replace config() with colorType() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 #include "SkCoreBlitters.h" 8 #include "SkCoreBlitters.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 493
494 SkASSERT(mask.fBounds.contains(clip)); 494 SkASSERT(mask.fBounds.contains(clip));
495 495
496 SkShader::Context* shaderContext = fShaderContext; 496 SkShader::Context* shaderContext = fShaderContext;
497 SkBlitMask::RowProc proc = NULL; 497 SkBlitMask::RowProc proc = NULL;
498 if (!fXfermode) { 498 if (!fXfermode) {
499 unsigned flags = 0; 499 unsigned flags = 0;
500 if (shaderContext->getFlags() & SkShader::kOpaqueAlpha_Flag) { 500 if (shaderContext->getFlags() & SkShader::kOpaqueAlpha_Flag) {
501 flags |= SkBlitMask::kSrcIsOpaque_RowFlag; 501 flags |= SkBlitMask::kSrcIsOpaque_RowFlag;
502 } 502 }
503 proc = SkBlitMask::RowFactory(SkBitmap::kARGB_8888_Config, mask.fFormat, 503 proc = SkBlitMask::RowFactory(kN32_SkColorType, mask.fFormat,
504 (SkBlitMask::RowFlags)flags); 504 (SkBlitMask::RowFlags)flags);
505 if (NULL == proc) { 505 if (NULL == proc) {
506 this->INHERITED::blitMask(mask, clip); 506 this->INHERITED::blitMask(mask, clip);
507 return; 507 return;
508 } 508 }
509 } 509 }
510 510
511 const int x = clip.fLeft; 511 const int x = clip.fLeft;
512 const int width = clip.width(); 512 const int width = clip.width();
513 int y = clip.fTop; 513 int y = clip.fTop;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 SkBlitRow::Proc32 proc = (255 == alpha) ? fProc32 : fProc32Blend; 631 SkBlitRow::Proc32 proc = (255 == alpha) ? fProc32 : fProc32Blend;
632 do { 632 do {
633 shaderContext->shadeSpan(x, y, span, 1); 633 shaderContext->shadeSpan(x, y, span, 1);
634 proc(device, span, 1, alpha); 634 proc(device, span, 1, alpha);
635 y += 1; 635 y += 1;
636 device = (uint32_t*)((char*)device + deviceRB); 636 device = (uint32_t*)((char*)device + deviceRB);
637 } while (--height > 0); 637 } while (--height > 0);
638 } 638 }
639 } 639 }
640 } 640 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698