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

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

Issue 1974833003: SkPictureGpuAnalyzer (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: GrContextThreadSafeProxy 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 GrContextThreadSafeProxy;
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 explicit SkPictureGpuAnalyzer(GrContextThreadSafeProxy* = nullptr);
bsalomon 2016/05/13 16:14:27 sk_sp<GrContextThreadSafeProxy>?
f(malita) 2016/05/13 16:59:16 Done. This also forced me to think about non-SK_S
24 explicit SkPictureGpuAnalyzer(const sk_sp<SkPicture>& picture,
25 GrContextThreadSafeProxy* = nullptr);
26
27 /**
28 * Process the given picture and accumulate its stats.
29 */
30 void analyze(const SkPicture*);
31
32 /**
33 * Reset all accumulated stats.
34 */
35 void reset();
36
37 /**
38 * Returns true if the analyzed pictures are suitable for rendering on the GPU.
39 */
40 bool suitableForGpuRasterization(const char** whyNot = nullptr) const;
41
42 private:
43 uint32_t fNumSlowPaths;
44
45 typedef SkNoncopyable INHERITED;
46 };
47
48 #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