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

Side by Side Diff: dm/DMSrcSink.h

Issue 885733002: Fold gmtoskp into DM, as --src gm --config skp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/DM.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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 public: 110 public:
111 explicit RasterSink(SkColorType); 111 explicit RasterSink(SkColorType);
112 112
113 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE; 113 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
114 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } 114 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
115 const char* fileExtension() const SK_OVERRIDE { return "png"; } 115 const char* fileExtension() const SK_OVERRIDE { return "png"; }
116 private: 116 private:
117 SkColorType fColorType; 117 SkColorType fColorType;
118 }; 118 };
119 119
120 class SKPSink : public Sink {
121 public:
122 SKPSink();
123
124 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
125 int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; }
126 const char* fileExtension() const SK_OVERRIDE { return "skp"; }
127 };
128
120 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 129 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
121 130
122 class ViaMatrix : public Sink { 131 class ViaMatrix : public Sink {
123 public: 132 public:
124 ViaMatrix(SkMatrix, Sink*); 133 ViaMatrix(SkMatrix, Sink*);
125 134
126 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE; 135 Error draw(const Src&, SkBitmap*, SkWStream*) const SK_OVERRIDE;
127 int enclave() const SK_OVERRIDE { return fSink->enclave(); } 136 int enclave() const SK_OVERRIDE { return fSink->enclave(); }
128 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); } 137 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); }
129 private: 138 private:
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); } 171 const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension( ); }
163 private: 172 private:
164 const int fW, fH; 173 const int fW, fH;
165 SkAutoTDelete<SkBBHFactory> fFactory; 174 SkAutoTDelete<SkBBHFactory> fFactory;
166 SkAutoTDelete<Sink> fSink; 175 SkAutoTDelete<Sink> fSink;
167 }; 176 };
168 177
169 } // namespace DM 178 } // namespace DM
170 179
171 #endif//DMSrcSink_DEFINED 180 #endif//DMSrcSink_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698