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 #if SK_SUPPORT_GPU | 8 #if SK_SUPPORT_GPU |
9 #include "GrLayerHoister.h" | 9 #include "GrLayerHoister.h" |
10 #include "GrRecordReplaceDraw.h" | 10 #include "GrRecordReplaceDraw.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 const SkPaint* paint) { | 64 const SkPaint* paint) { |
65 if (NULL == canvas || NULL == picture) { | 65 if (NULL == canvas || NULL == picture) { |
66 SkDEBUGFAIL("parameters to SkMultiPictureDraw::add should be non-NULL"); | 66 SkDEBUGFAIL("parameters to SkMultiPictureDraw::add should be non-NULL"); |
67 return; | 67 return; |
68 } | 68 } |
69 | 69 |
70 SkTDArray<DrawData>& array = canvas->getGrContext() ? fGPUDrawData : fThread SafeDrawData; | 70 SkTDArray<DrawData>& array = canvas->getGrContext() ? fGPUDrawData : fThread SafeDrawData; |
71 array.append()->init(canvas, picture, matrix, paint); | 71 array.append()->init(canvas, picture, matrix, paint); |
72 } | 72 } |
73 | 73 |
74 #define SK_IGNORE_GPU_LAYER_HOISTING 1 | |
mtklein
2014/11/03 19:46:02
This change was intentional?
robertphillips
2014/11/06 16:50:32
Done. Gone now - always on inside Skia.
| |
74 #undef SK_IGNORE_GPU_LAYER_HOISTING | 75 #undef SK_IGNORE_GPU_LAYER_HOISTING |
75 #define SK_IGNORE_GPU_LAYER_HOISTING 1 | |
76 | 76 |
77 class AutoMPDReset : SkNoncopyable { | 77 class AutoMPDReset : SkNoncopyable { |
78 SkMultiPictureDraw* fMPD; | 78 SkMultiPictureDraw* fMPD; |
79 public: | 79 public: |
80 AutoMPDReset(SkMultiPictureDraw* mpd) : fMPD(mpd) {} | 80 AutoMPDReset(SkMultiPictureDraw* mpd) : fMPD(mpd) {} |
81 ~AutoMPDReset() { fMPD->reset(); } | 81 ~AutoMPDReset() { fMPD->reset(); } |
82 }; | 82 }; |
83 | 83 |
84 void SkMultiPictureDraw::draw() { | 84 void SkMultiPictureDraw::draw() { |
85 AutoMPDReset mpdreset(this); | 85 AutoMPDReset mpdreset(this); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 | 179 |
180 #ifndef SK_IGNORE_GPU_LAYER_HOISTING | 180 #ifndef SK_IGNORE_GPU_LAYER_HOISTING |
181 GrLayerHoister::UnlockLayers(context, atlasedNeedRendering); | 181 GrLayerHoister::UnlockLayers(context, atlasedNeedRendering); |
182 GrLayerHoister::UnlockLayers(context, atlasedRecycled); | 182 GrLayerHoister::UnlockLayers(context, atlasedRecycled); |
183 #if !GR_CACHE_HOISTED_LAYERS | 183 #if !GR_CACHE_HOISTED_LAYERS |
184 GrLayerHoister::PurgeCache(context); | 184 GrLayerHoister::PurgeCache(context); |
185 #endif | 185 #endif |
186 #endif | 186 #endif |
187 } | 187 } |
188 | 188 |
OLD | NEW |