| Index: src/gpu/GrAtlas.cpp
|
| diff --git a/src/gpu/GrAtlas.cpp b/src/gpu/GrAtlas.cpp
|
| index 1bff42a82ff8dc3f9c3e82e8887121e9c49f5565..30b4bac13938b5f48bafbb0e1a45e810902bdcaa 100644
|
| --- a/src/gpu/GrAtlas.cpp
|
| +++ b/src/gpu/GrAtlas.cpp
|
| @@ -54,7 +54,8 @@
|
| loc->fY += offset.fY;
|
| }
|
|
|
| -bool GrPlot::addSubImage(int width, int height, const void* image, SkIPoint16* loc) {
|
| +bool GrPlot::addSubImage(int width, int height, const void* image,
|
| + SkIPoint16* loc) {
|
| float percentFull = fRects->percentFull();
|
| if (!fRects->addRect(width, height, loc)) {
|
| return false;
|
| @@ -87,7 +88,7 @@
|
| adjust_for_offset(loc, fOffset);
|
| fDirty = true;
|
| // otherwise, just upload the image directly
|
| - } else if (NULL != image) {
|
| + } else {
|
| adjust_for_offset(loc, fOffset);
|
| GrContext* context = fTexture->getContext();
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), "GrPlot::uploadToTexture");
|
| @@ -95,8 +96,6 @@
|
| loc->fX, loc->fY, width, height,
|
| fTexture->config(), image, 0,
|
| GrContext::kDontFlush_PixelOpsFlag);
|
| - } else {
|
| - adjust_for_offset(loc, fOffset);
|
| }
|
|
|
| #if FONT_CACHE_STATS
|
| @@ -147,12 +146,11 @@
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -GrAtlas::GrAtlas(GrGpu* gpu, GrPixelConfig config, GrTextureFlags flags,
|
| +GrAtlas::GrAtlas(GrGpu* gpu, GrPixelConfig config,
|
| const SkISize& backingTextureSize,
|
| int numPlotsX, int numPlotsY, bool batchUploads) {
|
| fGpu = SkRef(gpu);
|
| fPixelConfig = config;
|
| - fFlags = flags;
|
| fBackingTextureSize = backingTextureSize;
|
| fNumPlotsX = numPlotsX;
|
| fNumPlotsY = numPlotsY;
|
| @@ -223,7 +221,7 @@
|
| if (NULL == fTexture) {
|
| // TODO: Update this to use the cache rather than directly creating a texture.
|
| GrTextureDesc desc;
|
| - desc.fFlags = fFlags | kDynamicUpdate_GrTextureFlagBit;
|
| + desc.fFlags = kDynamicUpdate_GrTextureFlagBit;
|
| desc.fWidth = fBackingTextureSize.width();
|
| desc.fHeight = fBackingTextureSize.height();
|
| desc.fConfig = fPixelConfig;
|
|
|