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

Side by Side Diff: dm/DMSrcSink.cpp

Issue 847273005: More natural way to serialize GPU tasks and tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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
« dm/DM.cpp ('K') | « dm/DMSrcSink.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« dm/DM.cpp ('K') | « dm/DMSrcSink.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698