Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: src/core/SkMultiPictureDraw.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkMaskFilter.cpp ('k') | src/core/SkPictureImageGenerator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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, 9 // framework build, which gets its defines from SkTypes rather than a makefile,
10 // has the definition before checking it. 10 // has the definition before checking it.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 class AutoMPDReset : SkNoncopyable { 80 class AutoMPDReset : SkNoncopyable {
81 SkMultiPictureDraw* fMPD; 81 SkMultiPictureDraw* fMPD;
82 public: 82 public:
83 AutoMPDReset(SkMultiPictureDraw* mpd) : fMPD(mpd) {} 83 AutoMPDReset(SkMultiPictureDraw* mpd) : fMPD(mpd) {}
84 ~AutoMPDReset() { fMPD->reset(); } 84 ~AutoMPDReset() { fMPD->reset(); }
85 }; 85 };
86 86
87 //#define FORCE_SINGLE_THREAD_DRAWING_FOR_TESTING 87 //#define FORCE_SINGLE_THREAD_DRAWING_FOR_TESTING
88 #define SK_IGNORE_GPU_LAYER_HOISTING 1
88 89
89 void SkMultiPictureDraw::draw(bool flush) { 90 void SkMultiPictureDraw::draw(bool flush) {
90 AutoMPDReset mpdreset(this); 91 AutoMPDReset mpdreset(this);
91 92
92 #ifdef FORCE_SINGLE_THREAD_DRAWING_FOR_TESTING 93 #ifdef FORCE_SINGLE_THREAD_DRAWING_FOR_TESTING
93 for (int i = 0; i < fThreadSafeDrawData.count(); ++i) { 94 for (int i = 0; i < fThreadSafeDrawData.count(); ++i) {
94 fThreadSafeDrawData[i].draw(); 95 fThreadSafeDrawData[i].draw();
95 } 96 }
96 #else 97 #else
97 sk_parallel_for(fThreadSafeDrawData.count(), [&](int i) { 98 sk_parallel_for(fThreadSafeDrawData.count(), [&](int i) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 199 }
199 } 200 }
200 201
201 #if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU 202 #if !defined(SK_IGNORE_GPU_LAYER_HOISTING) && SK_SUPPORT_GPU
202 GrLayerHoister::UnlockLayers(context, atlasedNeedRendering); 203 GrLayerHoister::UnlockLayers(context, atlasedNeedRendering);
203 GrLayerHoister::UnlockLayers(context, atlasedRecycled); 204 GrLayerHoister::UnlockLayers(context, atlasedRecycled);
204 GrLayerHoister::End(context); 205 GrLayerHoister::End(context);
205 #endif 206 #endif
206 } 207 }
207 208
OLDNEW
« no previous file with comments | « src/core/SkMaskFilter.cpp ('k') | src/core/SkPictureImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698