| 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 // Need to include something before #if SK_SUPPORT_GPU so that the Android |
| 9 // framework build, which gets its defines from SkTypes rather than a makefile, |
| 10 // has the definition before checking it. |
| 11 #include "SkCanvas.h" |
| 12 #include "SkMultiPictureDraw.h" |
| 13 #include "SkPicture.h" |
| 14 #include "SkTaskGroup.h" |
| 15 |
| 8 #if SK_SUPPORT_GPU | 16 #if SK_SUPPORT_GPU |
| 9 #include "GrLayerHoister.h" | 17 #include "GrLayerHoister.h" |
| 10 #include "GrRecordReplaceDraw.h" | 18 #include "GrRecordReplaceDraw.h" |
| 11 #endif | 19 #endif |
| 12 | 20 |
| 13 #include "SkCanvas.h" | |
| 14 #include "SkMultiPictureDraw.h" | |
| 15 #include "SkPicture.h" | |
| 16 #include "SkTaskGroup.h" | |
| 17 | |
| 18 void SkMultiPictureDraw::DrawData::draw() { | 21 void SkMultiPictureDraw::DrawData::draw() { |
| 19 fCanvas->drawPicture(fPicture, &fMatrix, fPaint); | 22 fCanvas->drawPicture(fPicture, &fMatrix, fPaint); |
| 20 } | 23 } |
| 21 | 24 |
| 22 void SkMultiPictureDraw::DrawData::init(SkCanvas* canvas, const SkPicture* pictu
re, | 25 void SkMultiPictureDraw::DrawData::init(SkCanvas* canvas, const SkPicture* pictu
re, |
| 23 const SkMatrix* matrix, const SkPaint* p
aint) { | 26 const SkMatrix* matrix, const SkPaint* p
aint) { |
| 24 fPicture = SkRef(picture); | 27 fPicture = SkRef(picture); |
| 25 fCanvas = SkRef(canvas); | 28 fCanvas = SkRef(canvas); |
| 26 if (matrix) { | 29 if (matrix) { |
| 27 fMatrix = *matrix; | 30 fMatrix = *matrix; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 179 |
| 177 #if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU | 180 #if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU |
| 178 GrLayerHoister::UnlockLayers(context, atlasedNeedRendering); | 181 GrLayerHoister::UnlockLayers(context, atlasedNeedRendering); |
| 179 GrLayerHoister::UnlockLayers(context, atlasedRecycled); | 182 GrLayerHoister::UnlockLayers(context, atlasedRecycled); |
| 180 #if !GR_CACHE_HOISTED_LAYERS | 183 #if !GR_CACHE_HOISTED_LAYERS |
| 181 GrLayerHoister::PurgeCache(context); | 184 GrLayerHoister::PurgeCache(context); |
| 182 #endif | 185 #endif |
| 183 #endif | 186 #endif |
| 184 } | 187 } |
| 185 | 188 |
| OLD | NEW |