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

Unified Diff: src/core/SkBitmapProcState_matrixProcs.cpp

Issue 1158273007: switch bitmapshader internals over to pixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix neon/mips to use pixmpas Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBitmapProcState_matrix.h ('k') | src/core/SkBitmapProcState_matrix_template.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState_matrixProcs.cpp
diff --git a/src/core/SkBitmapProcState_matrixProcs.cpp b/src/core/SkBitmapProcState_matrixProcs.cpp
index b7a2ccbdd096b5abc645ddfccf294ad943a33527..1870a0e50e90f896a49c3d57102d426bd628612d 100644
--- a/src/core/SkBitmapProcState_matrixProcs.cpp
+++ b/src/core/SkBitmapProcState_matrixProcs.cpp
@@ -1,3 +1,12 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+// The copyright below was added in 2009, but I see no record of moto contributions...?
+
/* NEON optimized code (C) COPYRIGHT 2009 Motorola
*
* Use of this source code is governed by a BSD-style license that can be
@@ -321,7 +330,7 @@ static int nofilter_trans_preamble(const SkBitmapProcState& s, uint32_t** xy,
s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf,
SkIntToScalar(y) + SK_ScalarHalf, &pt);
**xy = s.fIntTileProcY(SkScalarToFixed(pt.fY) >> 16,
- s.fBitmap->height());
+ s.fPixmap.height());
*xy += 1; // bump the ptr
// return our starting X position
return SkScalarToFixed(pt.fX) >> 16;
@@ -332,7 +341,7 @@ static void clampx_nofilter_trans(const SkBitmapProcState& s,
SkASSERT((s.fInvType & ~SkMatrix::kTranslate_Mask) == 0);
int xpos = nofilter_trans_preamble(s, &xy, x, y);
- const int width = s.fBitmap->width();
+ const int width = s.fPixmap.width();
if (1 == width) {
// all of the following X values must be 0
memset(xy, 0, count * sizeof(uint16_t));
@@ -380,7 +389,7 @@ static void repeatx_nofilter_trans(const SkBitmapProcState& s,
SkASSERT((s.fInvType & ~SkMatrix::kTranslate_Mask) == 0);
int xpos = nofilter_trans_preamble(s, &xy, x, y);
- const int width = s.fBitmap->width();
+ const int width = s.fPixmap.width();
if (1 == width) {
// all of the following X values must be 0
memset(xy, 0, count * sizeof(uint16_t));
@@ -420,7 +429,7 @@ static void mirrorx_nofilter_trans(const SkBitmapProcState& s,
SkASSERT((s.fInvType & ~SkMatrix::kTranslate_Mask) == 0);
int xpos = nofilter_trans_preamble(s, &xy, x, y);
- const int width = s.fBitmap->width();
+ const int width = s.fPixmap.width();
if (1 == width) {
// all of the following X values must be 0
memset(xy, 0, count * sizeof(uint16_t));
@@ -507,8 +516,8 @@ SkBitmapProcState::MatrixProc SkBitmapProcState::chooseMatrixProc(bool trivial_m
}
// all remaining procs use this form for filterOne
- fFilterOneX = SK_Fixed1 / fBitmap->width();
- fFilterOneY = SK_Fixed1 / fBitmap->height();
+ fFilterOneX = SK_Fixed1 / fPixmap.width();
+ fFilterOneY = SK_Fixed1 / fPixmap.height();
if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode == fTileModeY) {
return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index];
« no previous file with comments | « src/core/SkBitmapProcState_matrix.h ('k') | src/core/SkBitmapProcState_matrix_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698