diff options
author | Romain Guy <romainguy@google.com> | 2010-08-09 20:48:09 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2010-08-10 12:22:01 -0700 |
commit | 61c8c9c5b2006d18e9310b6521c65b36ffe75ce4 (patch) | |
tree | f2a792387a3177a2e7a25290ec48bd79c62ef3e6 /libs/hwui/SkiaShader.cpp | |
parent | 8cc82c6f4802937309dce6cba310e31358cdf6bf (diff) | |
download | frameworks_base-61c8c9c5b2006d18e9310b6521c65b36ffe75ce4.zip frameworks_base-61c8c9c5b2006d18e9310b6521c65b36ffe75ce4.tar.gz frameworks_base-61c8c9c5b2006d18e9310b6521c65b36ffe75ce4.tar.bz2 |
Fix tons of bugs and add new text rendering support.
Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
Diffstat (limited to 'libs/hwui/SkiaShader.cpp')
-rw-r--r-- | libs/hwui/SkiaShader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp index 42c0621..15a4e88 100644 --- a/libs/hwui/SkiaShader.cpp +++ b/libs/hwui/SkiaShader.cpp @@ -89,7 +89,8 @@ void SkiaBitmapShader::describe(ProgramDescription& description, const Extension description.hasBitmap = true; // The driver does not support non-power of two mirrored/repeated // textures, so do it ourselves - if (!extensions.hasNPot() && !isPowerOfTwo(width) && !isPowerOfTwo(height)) { + if (!extensions.hasNPot() && (!isPowerOfTwo(width) || !isPowerOfTwo(height)) && + (mTileX != SkShader::kClamp_TileMode || mTileY != SkShader::kClamp_TileMode)) { description.isBitmapNpot = true; description.bitmapWrapS = gTileModes[mTileX]; description.bitmapWrapT = gTileModes[mTileY]; @@ -136,6 +137,9 @@ SkiaLinearGradientShader::SkiaLinearGradientShader(float* bounds, uint32_t* colo SkMatrix* matrix, bool blend): SkiaShader(kLinearGradient, key, tileMode, tileMode, matrix, blend), mBounds(bounds), mColors(colors), mPositions(positions), mCount(count) { + for (int i = 0; i < count; i++) { + LOGD("[GL] Gradient color %d = 0x%x", i, colors[i]); + } } SkiaLinearGradientShader::~SkiaLinearGradientShader() { |