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

Side by Side Diff: skia/ext/benchmarking_canvas.h

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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 | « skia/ext/analysis_canvas_unittest.cc ('k') | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/values.h" 8 #include "base/values.h"
9 #include "skia/ext/refptr.h"
9 #include "third_party/skia/include/utils/SkNWayCanvas.h" 10 #include "third_party/skia/include/utils/SkNWayCanvas.h"
10 11
12 class SkXfermode;
13
11 namespace skia { 14 namespace skia {
12 15
13 class SK_API BenchmarkingCanvas : public SkNWayCanvas { 16 class SK_API BenchmarkingCanvas : public SkNWayCanvas {
14 public: 17 public:
15 BenchmarkingCanvas(SkCanvas* canvas, unsigned flags = 0); 18 BenchmarkingCanvas(SkCanvas* canvas, unsigned flags = 0);
16 ~BenchmarkingCanvas() override; 19 ~BenchmarkingCanvas() override;
17 20
18 enum Flags { 21 enum Flags {
19 // TODO(fmalita): add overdraw visualization support
20 // (http://crbug.com/461534)
21 kOverdrawVisualization_Flag = 0x01, 22 kOverdrawVisualization_Flag = 0x01,
22 }; 23 };
23 24
24 // Returns the number of draw commands executed on this canvas. 25 // Returns the number of draw commands executed on this canvas.
25 size_t CommandCount() const; 26 size_t CommandCount() const;
26 27
27 // Returns the list of executed draw commands. 28 // Returns the list of executed draw commands.
28 const base::ListValue& Commands() const; 29 const base::ListValue& Commands() const;
29 30
30 // Return the recorded render time (milliseconds) for a draw command index. 31 // Return the recorded render time (milliseconds) for a draw command index.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, 79 void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
79 const SkPaint& paint) override; 80 const SkPaint& paint) override;
80 81
81 private: 82 private:
82 typedef SkNWayCanvas INHERITED; 83 typedef SkNWayCanvas INHERITED;
83 84
84 class AutoOp; 85 class AutoOp;
85 86
86 base::ListValue op_records_; 87 base::ListValue op_records_;
87 unsigned flags_; 88 unsigned flags_;
89 RefPtr<SkXfermode> overdraw_xfermode_;
88 }; 90 };
89 91
90 } 92 }
91 #endif // SKIA_EXT_BENCHMARKING_CANVAS_H 93 #endif // SKIA_EXT_BENCHMARKING_CANVAS_H
OLDNEW
« no previous file with comments | « skia/ext/analysis_canvas_unittest.cc ('k') | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698