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

Side by Side Diff: include/core/SkPictureAnalyzer.h

Issue 1974833003: SkPictureGpuAnalyzer (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: unneeded 'explicit' Created 4 years, 7 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 | « include/core/SkPicture.h ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkPictureAnalyzer_DEFINED
9 #define SkPictureAnalyzer_DEFINED
10
11 #include "SkRefCnt.h"
12 #include "SkTypes.h"
13
14 class GrContext;
15 class SkPicture;
16
17 /** \class SkPictureGpuAnalyzer
18
19 Gathers GPU-related statistics for one or more SkPictures.
20 */
21 class SK_API SkPictureGpuAnalyzer final : public SkNoncopyable {
22 public:
23 SkPictureGpuAnalyzer();
24 explicit SkPictureGpuAnalyzer(const sk_sp<SkPicture>& picture);
25
26 /**
27 * Process the given picture and accumulate its stats.
28 */
29 void analyze(const SkPicture*);
30
31 /**
32 * Reset all accumulated stats.
33 */
34 void reset();
35
36 /**
37 * Returns true if the analyzed pictures are suitable for rendering on the GPU.
38 */
39 bool suitableForGpuRasterization(GrContext*, const char** whyNot = nullptr) const;
bsalomon 2016/05/12 20:59:02 Should we take the GrContext* in the constructor i
f(malita) 2016/05/12 21:15:19 Done.
40
41 private:
42 uint32_t fNumSlowPaths;
43
44 typedef SkNoncopyable INHERITED;
45 };
46
47 #endif // SkPictureAnalyzer_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698