| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 SKIA_EXT_BENCHMARKING_CANVAS_H_ | 5 #ifndef SKIA_EXT_BENCHMARKING_CANVAS_H_ |
| 6 #define SKIA_EXT_BENCHMARKING_CANVAS_H_ | 6 #define SKIA_EXT_BENCHMARKING_CANVAS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "skia/ext/refptr.h" | |
| 12 #include "third_party/skia/include/utils/SkNWayCanvas.h" | 11 #include "third_party/skia/include/utils/SkNWayCanvas.h" |
| 13 | 12 |
| 14 class SkXfermode; | 13 class SkXfermode; |
| 15 | 14 |
| 16 namespace skia { | 15 namespace skia { |
| 17 | 16 |
| 18 class SK_API BenchmarkingCanvas : public SkNWayCanvas { | 17 class SK_API BenchmarkingCanvas : public SkNWayCanvas { |
| 19 public: | 18 public: |
| 20 BenchmarkingCanvas(SkCanvas* canvas, unsigned flags = 0); | 19 BenchmarkingCanvas(SkCanvas* canvas, unsigned flags = 0); |
| 21 ~BenchmarkingCanvas() override; | 20 ~BenchmarkingCanvas() override; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 77 void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
| 79 const SkPaint& paint) override; | 78 const SkPaint& paint) override; |
| 80 | 79 |
| 81 private: | 80 private: |
| 82 typedef SkNWayCanvas INHERITED; | 81 typedef SkNWayCanvas INHERITED; |
| 83 | 82 |
| 84 class AutoOp; | 83 class AutoOp; |
| 85 | 84 |
| 86 base::ListValue op_records_; | 85 base::ListValue op_records_; |
| 87 unsigned flags_; | 86 unsigned flags_; |
| 88 RefPtr<SkXfermode> overdraw_xfermode_; | 87 sk_sp<SkXfermode> overdraw_xfermode_; |
| 89 }; | 88 }; |
| 90 | 89 |
| 91 } | 90 } |
| 92 #endif // SKIA_EXT_BENCHMARKING_CANVAS_H | 91 #endif // SKIA_EXT_BENCHMARKING_CANVAS_H |
| OLD | NEW |