| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ | 5 #ifndef CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ |
| 6 #define CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ | 6 #define CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "cc/base/cc_export.h" |
| 9 #include "third_party/skia/include/utils/SkNWayCanvas.h" | 10 #include "third_party/skia/include/utils/SkNWayCanvas.h" |
| 10 | 11 |
| 11 namespace cc { | 12 namespace cc { |
| 12 | 13 |
| 13 class ImageDecodeCache; | 14 class ImageDecodeCache; |
| 14 | 15 |
| 15 class ImageHijackCanvas : public SkNWayCanvas { | 16 class CC_EXPORT ImageHijackCanvas : public SkNWayCanvas { |
| 16 public: | 17 public: |
| 17 ImageHijackCanvas(int width, | 18 ImageHijackCanvas(int width, |
| 18 int height, | 19 int height, |
| 19 ImageDecodeCache* image_decode_cache); | 20 ImageDecodeCache* image_decode_cache); |
| 20 | 21 |
| 21 private: | 22 private: |
| 22 // Ensure that pictures are unpacked by this canvas, instead of being | 23 // Ensure that pictures are unpacked by this canvas, instead of being |
| 23 // forwarded to the raster canvas. | 24 // forwarded to the raster canvas. |
| 24 void onDrawPicture(const SkPicture* picture, | 25 void onDrawPicture(const SkPicture* picture, |
| 25 const SkMatrix* matrix, | 26 const SkMatrix* matrix, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 48 const SkPaint* paint) override; | 49 const SkPaint* paint) override; |
| 49 | 50 |
| 50 ImageDecodeCache* image_decode_cache_; | 51 ImageDecodeCache* image_decode_cache_; |
| 51 | 52 |
| 52 DISALLOW_COPY_AND_ASSIGN(ImageHijackCanvas); | 53 DISALLOW_COPY_AND_ASSIGN(ImageHijackCanvas); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace cc | 56 } // namespace cc |
| 56 | 57 |
| 57 #endif // CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ | 58 #endif // CC_PLAYBACK_IMAGE_HIJACK_CANVAS_H_ |
| OLD | NEW |