OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrAtlas.h" | 8 #include "GrAtlas.h" |
| 9 #include "GrContext.h" |
9 #include "GrDrawContext.h" | 10 #include "GrDrawContext.h" |
10 #include "GrGpu.h" | 11 #include "GrGpu.h" |
11 #include "GrLayerCache.h" | 12 #include "GrLayerCache.h" |
12 #include "GrSurfacePriv.h" | 13 #include "GrSurfacePriv.h" |
13 | 14 |
14 #ifdef SK_DEBUG | 15 #ifdef SK_DEBUG |
15 void GrCachedLayer::validate(const GrTexture* backingTexture) const { | 16 void GrCachedLayer::validate(const GrTexture* backingTexture) const { |
16 SkASSERT(SK_InvalidGenID != fKey.pictureID()); | 17 SkASSERT(SK_InvalidGenID != fKey.pictureID()); |
17 | 18 |
18 if (fTexture) { | 19 if (fTexture) { |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 fileName.appendf("\\%d", layer->fKey.pictureID()); | 509 fileName.appendf("\\%d", layer->fKey.pictureID()); |
509 for (int i = 0; i < layer->fKey.keySize(); ++i) { | 510 for (int i = 0; i < layer->fKey.keySize(); ++i) { |
510 fileName.appendf("-%d", layer->fKey.key()[i]); | 511 fileName.appendf("-%d", layer->fKey.key()[i]); |
511 } | 512 } |
512 fileName.appendf(".png"); | 513 fileName.appendf(".png"); |
513 | 514 |
514 layer->texture()->surfacePriv().savePixels(fileName.c_str()); | 515 layer->texture()->surfacePriv().savePixels(fileName.c_str()); |
515 } | 516 } |
516 } | 517 } |
517 #endif | 518 #endif |
OLD | NEW |