aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBlitMask_D32.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-29 15:57:47 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-29 15:57:47 +0000
commitcba73780bbd12fd254229517aec04fcbf0b64b52 (patch)
treef987d9fd68f7287c02b26f6fd9d073308051cef3 /src/core/SkBlitMask_D32.cpp
parent00f8d6c75d22ce8f95f932c5b101354b196fa0df (diff)
replace config() with colorType()
BUG=skia: R=robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/303543009 git-svn-id: http://skia.googlecode.com/svn/trunk@14959 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBlitMask_D32.cpp')
-rw-r--r--src/core/SkBlitMask_D32.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/core/SkBlitMask_D32.cpp b/src/core/SkBlitMask_D32.cpp
index 008386caa5..ef4d84bfcf 100644
--- a/src/core/SkBlitMask_D32.cpp
+++ b/src/core/SkBlitMask_D32.cpp
@@ -1,3 +1,10 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
#include "SkBlitMask.h"
#include "SkColor.h"
#include "SkColorPriv.h"
@@ -230,16 +237,16 @@ static SkBlitMask::ColorProc D32_LCD32_Factory(SkColor color) {
return (0xFF == SkColorGetA(color)) ? D32_LCD32_Opaque : D32_LCD32_Blend;
}
-SkBlitMask::ColorProc SkBlitMask::ColorFactory(SkBitmap::Config config,
+SkBlitMask::ColorProc SkBlitMask::ColorFactory(SkColorType ct,
SkMask::Format format,
SkColor color) {
- ColorProc proc = PlatformColorProcs(config, format, color);
+ ColorProc proc = PlatformColorProcs(ct, format, color);
if (proc) {
return proc;
}
- switch (config) {
- case SkBitmap::kARGB_8888_Config:
+ switch (ct) {
+ case kN32_SkColorType:
switch (format) {
case SkMask::kA8_Format:
return D32_A8_Factory(color);
@@ -259,7 +266,7 @@ SkBlitMask::ColorProc SkBlitMask::ColorFactory(SkBitmap::Config config,
bool SkBlitMask::BlitColor(const SkBitmap& device, const SkMask& mask,
const SkIRect& clip, SkColor color) {
- ColorProc proc = ColorFactory(device.config(), mask.fFormat, color);
+ ColorProc proc = ColorFactory(device.colorType(), mask.fFormat, color);
if (proc) {
int x = clip.fLeft;
int y = clip.fTop;
@@ -548,11 +555,11 @@ static void LCD32_RowProc_Opaque(SkPMColor* SK_RESTRICT dst,
}
}
-SkBlitMask::RowProc SkBlitMask::RowFactory(SkBitmap::Config config,
+SkBlitMask::RowProc SkBlitMask::RowFactory(SkColorType ct,
SkMask::Format format,
RowFlags flags) {
// make this opt-in until chrome can rebaseline
- RowProc proc = PlatformRowProcs(config, format, flags);
+ RowProc proc = PlatformRowProcs(ct, format, flags);
if (proc) {
return proc;
}
@@ -567,8 +574,8 @@ SkBlitMask::RowProc SkBlitMask::RowFactory(SkBitmap::Config config,
};
int index;
- switch (config) {
- case SkBitmap::kARGB_8888_Config:
+ switch (ct) {
+ case kN32_SkColorType:
switch (format) {
case SkMask::kBW_Format: index = 0; break;
case SkMask::kA8_Format: index = 2; break;