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

Unified Diff: src/core/SkShader.cpp

Issue 1889753002: remove U16 support, just support F16 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address reviewer comments, mostly fixing class/function names Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkCoreBlitters.h ('k') | src/core/SkSpriteBlitter4f.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkShader.cpp
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 8032cc6e4cbc1655640b37359a56857cf2b17270..0ed97b02239e3d9bc7b9f429d1c56ca97a301f59 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -375,16 +375,16 @@ static void D32_BlitAA(SkShader::Context::BlitState* state, int x, int y, const
proc(state->fXfer, dst.writable_addr32(x, y), src, count, aa);
}
-static void D64_BlitBW(SkShader::Context::BlitState* state, int x, int y, const SkPixmap& dst,
+static void F16_BlitBW(SkShader::Context::BlitState* state, int x, int y, const SkPixmap& dst,
int count) {
- SkXfermode::D64Proc proc = (SkXfermode::D64Proc)state->fStorage[0];
+ SkXfermode::F16Proc proc = (SkXfermode::F16Proc)state->fStorage[0];
const SkPM4f* src = (const SkPM4f*)state->fStorage[1];
proc(state->fXfer, dst.writable_addr64(x, y), src, count, nullptr);
}
-static void D64_BlitAA(SkShader::Context::BlitState* state, int x, int y, const SkPixmap& dst,
+static void F16_BlitAA(SkShader::Context::BlitState* state, int x, int y, const SkPixmap& dst,
int count, const SkAlpha aa[]) {
- SkXfermode::D64Proc proc = (SkXfermode::D64Proc)state->fStorage[0];
+ SkXfermode::F16Proc proc = (SkXfermode::F16Proc)state->fStorage[0];
const SkPM4f* src = (const SkPM4f*)state->fStorage[1];
proc(state->fXfer, dst.writable_addr64(x, y), src, count, aa);
}
@@ -406,11 +406,10 @@ bool SkColorShader::ColorShaderContext::onChooseBlitProcs(const SkImageInfo& inf
state->fBlitAA = D32_BlitAA;
return true;
case kRGBA_F16_SkColorType:
- flags |= SkXfermode::kDstIsFloat16_D64Flag;
- state->fStorage[0] = (void*)SkXfermode::GetD64Proc(state->fXfer, flags);
+ state->fStorage[0] = (void*)SkXfermode::GetF16Proc(state->fXfer, flags);
state->fStorage[1] = &fPM4f;
- state->fBlitBW = D64_BlitBW;
- state->fBlitAA = D64_BlitAA;
+ state->fBlitBW = F16_BlitBW;
+ state->fBlitAA = F16_BlitAA;
return true;
default:
return false;
« no previous file with comments | « src/core/SkCoreBlitters.h ('k') | src/core/SkSpriteBlitter4f.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698