OLD | NEW |
1 #include "DMSrcSink.h" | 1 #include "DMSrcSink.h" |
2 #include "SamplePipeControllers.h" | 2 #include "SamplePipeControllers.h" |
3 #include "SkCommonFlags.h" | 3 #include "SkCommonFlags.h" |
4 #include "SkDocument.h" | 4 #include "SkDocument.h" |
5 #include "SkMultiPictureDraw.h" | 5 #include "SkMultiPictureDraw.h" |
6 #include "SkOSFile.h" | 6 #include "SkOSFile.h" |
7 #include "SkPictureRecorder.h" | 7 #include "SkPictureRecorder.h" |
8 #include "SkRandom.h" | 8 #include "SkRandom.h" |
9 #include "SkStream.h" | 9 #include "SkStream.h" |
10 | 10 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 int samples, | 134 int samples, |
135 bool dfText, | 135 bool dfText, |
136 bool threaded) | 136 bool threaded) |
137 : fContextType(ct) | 137 : fContextType(ct) |
138 , fGpuAPI(api) | 138 , fGpuAPI(api) |
139 , fSampleCount(samples) | 139 , fSampleCount(samples) |
140 , fUseDFText(dfText) | 140 , fUseDFText(dfText) |
141 , fThreaded(threaded) {} | 141 , fThreaded(threaded) {} |
142 | 142 |
143 int GPUSink::enclave() const { | 143 int GPUSink::enclave() const { |
144 return fThreaded ? kAnyThread_Enclave : kGPUSink_Enclave; | 144 return fThreaded ? kAnyThread_Enclave : kGPU_Enclave; |
145 } | 145 } |
146 | 146 |
147 Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*) const { | 147 Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*) const { |
148 GrContextFactory* factory = GetThreadLocalGrContextFactory(); | 148 GrContextFactory* factory = GetThreadLocalGrContextFactory(); |
149 if (FLAGS_abandonGpuContext) { | 149 if (FLAGS_abandonGpuContext) { |
150 factory->abandonContexts(); | 150 factory->abandonContexts(); |
151 } | 151 } |
152 if (FLAGS_resetGpuContext || FLAGS_abandonGpuContext) { | 152 if (FLAGS_resetGpuContext || FLAGS_abandonGpuContext) { |
153 factory->destroyContexts(); | 153 factory->destroyContexts(); |
154 } | 154 } |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 surfaces.unrefAll(); | 348 surfaces.unrefAll(); |
349 return ""; | 349 return ""; |
350 } | 350 } |
351 SkISize size() const SK_OVERRIDE { return fSize; } | 351 SkISize size() const SK_OVERRIDE { return fSize; } |
352 Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one shou
ld be calling this. | 352 Name name() const SK_OVERRIDE { sk_throw(); return ""; } // No one shou
ld be calling this. |
353 } proxy(fW, fH, pic, src.size()); | 353 } proxy(fW, fH, pic, src.size()); |
354 return fSink->draw(proxy, bitmap, stream); | 354 return fSink->draw(proxy, bitmap, stream); |
355 } | 355 } |
356 | 356 |
357 } // namespace DM | 357 } // namespace DM |
OLD | NEW |