OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef DMSrcSink_DEFINED | 8 #ifndef DMSrcSink_DEFINED |
9 #define DMSrcSink_DEFINED | 9 #define DMSrcSink_DEFINED |
10 | 10 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 public: | 242 public: |
243 explicit ViaPipe(Sink*); | 243 explicit ViaPipe(Sink*); |
244 | 244 |
245 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 245 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
246 int enclave() const override { return fSink->enclave(); } | 246 int enclave() const override { return fSink->enclave(); } |
247 const char* fileExtension() const override { return fSink->fileExtension();
} | 247 const char* fileExtension() const override { return fSink->fileExtension();
} |
248 private: | 248 private: |
249 SkAutoTDelete<Sink> fSink; | 249 SkAutoTDelete<Sink> fSink; |
250 }; | 250 }; |
251 | 251 |
| 252 class ViaDeferred : public Sink { |
| 253 public: |
| 254 explicit ViaDeferred(Sink*); |
| 255 |
| 256 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
| 257 int enclave() const override { return fSink->enclave(); } |
| 258 const char* fileExtension() const override { return fSink->fileExtension();
} |
| 259 private: |
| 260 SkAutoTDelete<Sink> fSink; |
| 261 }; |
| 262 |
252 class ViaSerialization : public Sink { | 263 class ViaSerialization : public Sink { |
253 public: | 264 public: |
254 explicit ViaSerialization(Sink*); | 265 explicit ViaSerialization(Sink*); |
255 | 266 |
256 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 267 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
257 int enclave() const override { return fSink->enclave(); } | 268 int enclave() const override { return fSink->enclave(); } |
258 const char* fileExtension() const override { return fSink->fileExtension();
} | 269 const char* fileExtension() const override { return fSink->fileExtension();
} |
259 private: | 270 private: |
260 SkAutoTDelete<Sink> fSink; | 271 SkAutoTDelete<Sink> fSink; |
261 }; | 272 }; |
(...skipping 18 matching lines...) Expand all Loading... |
280 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; | 291 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; |
281 int enclave() const override { return fSink->enclave(); } | 292 int enclave() const override { return fSink->enclave(); } |
282 const char* fileExtension() const override { return fSink->fileExtension();
} | 293 const char* fileExtension() const override { return fSink->fileExtension();
} |
283 private: | 294 private: |
284 SkAutoTDelete<Sink> fSink; | 295 SkAutoTDelete<Sink> fSink; |
285 }; | 296 }; |
286 | 297 |
287 } // namespace DM | 298 } // namespace DM |
288 | 299 |
289 #endif//DMSrcSink_DEFINED | 300 #endif//DMSrcSink_DEFINED |
OLD | NEW |