| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrGpu.h" | 8 #include "GrGpu.h" |
| 9 #include "GrRectanizer.h" | 9 #include "GrRectanizer.h" |
| 10 #include "GrSurfacePriv.h" |
| 10 #include "GrTextStrike.h" | 11 #include "GrTextStrike.h" |
| 11 #include "GrTextStrike_impl.h" | 12 #include "GrTextStrike_impl.h" |
| 12 #include "SkString.h" | 13 #include "SkString.h" |
| 13 | 14 |
| 14 #include "SkDistanceFieldGen.h" | 15 #include "SkDistanceFieldGen.h" |
| 15 | 16 |
| 16 /////////////////////////////////////////////////////////////////////////////// | 17 /////////////////////////////////////////////////////////////////////////////// |
| 17 | 18 |
| 18 #define GR_ATLAS_TEXTURE_WIDTH 1024 | 19 #define GR_ATLAS_TEXTURE_WIDTH 1024 |
| 19 #define GR_ATLAS_TEXTURE_HEIGHT 2048 | 20 #define GR_ATLAS_TEXTURE_HEIGHT 2048 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 for (int i = 0; i < kAtlasCount; ++i) { | 200 for (int i = 0; i < kAtlasCount; ++i) { |
| 200 if (fAtlases[i]) { | 201 if (fAtlases[i]) { |
| 201 GrTexture* texture = fAtlases[i]->getTexture(); | 202 GrTexture* texture = fAtlases[i]->getTexture(); |
| 202 if (texture) { | 203 if (texture) { |
| 203 SkString filename; | 204 SkString filename; |
| 204 #ifdef SK_BUILD_FOR_ANDROID | 205 #ifdef SK_BUILD_FOR_ANDROID |
| 205 filename.printf("/sdcard/fontcache_%d%d.png", gDumpCount, i); | 206 filename.printf("/sdcard/fontcache_%d%d.png", gDumpCount, i); |
| 206 #else | 207 #else |
| 207 filename.printf("fontcache_%d%d.png", gDumpCount, i); | 208 filename.printf("fontcache_%d%d.png", gDumpCount, i); |
| 208 #endif | 209 #endif |
| 209 texture->savePixels(filename.c_str()); | 210 texture->surfacePriv().savePixels(filename.c_str()); |
| 210 } | 211 } |
| 211 } | 212 } |
| 212 } | 213 } |
| 213 ++gDumpCount; | 214 ++gDumpCount; |
| 214 } | 215 } |
| 215 | 216 |
| 216 /////////////////////////////////////////////////////////////////////////////// | 217 /////////////////////////////////////////////////////////////////////////////// |
| 217 | 218 |
| 218 #ifdef SK_DEBUG | 219 #ifdef SK_DEBUG |
| 219 static int gCounter; | 220 static int gCounter; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 glyph->height(), storage.get(), | 341 glyph->height(), storage.get(), |
| 341 &glyph->fAtlasLocation); | 342 &glyph->fAtlasLocation); |
| 342 | 343 |
| 343 if (NULL == plot) { | 344 if (NULL == plot) { |
| 344 return false; | 345 return false; |
| 345 } | 346 } |
| 346 | 347 |
| 347 glyph->fPlot = plot; | 348 glyph->fPlot = plot; |
| 348 return true; | 349 return true; |
| 349 } | 350 } |
| OLD | NEW |