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

Side by Side Diff: dm/DMSrcSink.h

Issue 847273005: More natural way to serialize GPU tasks and tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: always stack-scope GrContextFactories 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
« no previous file with comments | « dm/DMGpuSupport.cpp ('k') | dm/DMSrcSink.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 #ifndef DMSrcSink_DEFINED 1 #ifndef DMSrcSink_DEFINED
2 #define DMSrcSink_DEFINED 2 #define DMSrcSink_DEFINED
3 3
4 #include "DMGpuSupport.h" 4 #include "DMGpuSupport.h"
5 #include "SkBBHFactory.h" 5 #include "SkBBHFactory.h"
6 #include "SkBBoxHierarchy.h" 6 #include "SkBBoxHierarchy.h"
7 #include "SkBitmap.h" 7 #include "SkBitmap.h"
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkGPipe.h" 10 #include "SkGPipe.h"
(...skipping 23 matching lines...) Expand all
34 // You may write to either the bitmap or stream. 34 // You may write to either the bitmap or stream.
35 virtual Error SK_WARN_UNUSED_RESULT draw(const Src&, SkBitmap*, SkWStream*) const 35 virtual Error SK_WARN_UNUSED_RESULT draw(const Src&, SkBitmap*, SkWStream*) const
36 = 0; 36 = 0;
37 // Sinks in the same enclave (except kAnyThread_Enclave) will run serially o n the same thread. 37 // Sinks in the same enclave (except kAnyThread_Enclave) will run serially o n the same thread.
38 virtual int enclave() const = 0; 38 virtual int enclave() const = 0;
39 39
40 // File extension for the content draw() outputs, e.g. "png", "pdf". 40 // File extension for the content draw() outputs, e.g. "png", "pdf".
41 virtual const char* fileExtension() const = 0; 41 virtual const char* fileExtension() const = 0;
42 }; 42 };
43 43
44 enum { kAnyThread_Enclave, kGPUSink_Enclave, kPDFSink_Enclave }; 44 enum { kAnyThread_Enclave, kGPU_Enclave, kPDFSink_Enclave };
45 static const int kNumEnclaves = kPDFSink_Enclave + 1; 45 static const int kNumEnclaves = kPDFSink_Enclave + 1;
46 46
47 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 47 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
48 48
49 class GMSrc : public Src { 49 class GMSrc : public Src {
50 public: 50 public:
51 explicit GMSrc(skiagm::GMRegistry::Factory); 51 explicit GMSrc(skiagm::GMRegistry::Factory);
52 52
53 Error draw(SkCanvas*) const SK_OVERRIDE; 53 Error draw(SkCanvas*) const SK_OVERRIDE;
54 SkISize size() const SK_OVERRIDE; 54 SkISize size() const SK_OVERRIDE;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); } 162 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); }
163 private: 163 private:
164 const int fW, fH; 164 const int fW, fH;
165 SkAutoTDelete<SkBBHFactory> fFactory; 165 SkAutoTDelete<SkBBHFactory> fFactory;
166 SkAutoTDelete<Sink> fSink; 166 SkAutoTDelete<Sink> fSink;
167 }; 167 };
168 168
169 } // namespace DM 169 } // namespace DM
170 170
171 #endif//DMSrcSink_DEFINED 171 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DMGpuSupport.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698