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

Side by Side Diff: src/core/SkBigPicture.h

Issue 1978533002: Remove SkPicture::hasText() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: 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/SkBigPicture.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkBigPicture_DEFINED 8 #ifndef SkBigPicture_DEFINED
9 #define SkBigPicture_DEFINED 9 #define SkBigPicture_DEFINED
10 10
(...skipping 29 matching lines...) Expand all
40 SkRecord*, // We take ownership of the caller's ref. 40 SkRecord*, // We take ownership of the caller's ref.
41 SnapshotArray*, // We take exclusive ownership. 41 SnapshotArray*, // We take exclusive ownership.
42 SkBBoxHierarchy*, // We take ownership of the caller's ref. 42 SkBBoxHierarchy*, // We take ownership of the caller's ref.
43 AccelData*, // We take ownership of the caller's ref. 43 AccelData*, // We take ownership of the caller's ref.
44 size_t approxBytesUsedBySubPictures); 44 size_t approxBytesUsedBySubPictures);
45 45
46 46
47 // SkPicture overrides 47 // SkPicture overrides
48 void playback(SkCanvas*, AbortCallback*) const override; 48 void playback(SkCanvas*, AbortCallback*) const override;
49 SkRect cullRect() const override; 49 SkRect cullRect() const override;
50 bool hasText() const override;
51 bool willPlayBackBitmaps() const override; 50 bool willPlayBackBitmaps() const override;
52 int approximateOpCount() const override; 51 int approximateOpCount() const override;
53 size_t approximateBytesUsed() const override; 52 size_t approximateBytesUsed() const override;
54 const SkBigPicture* asSkBigPicture() const override { return this; } 53 const SkBigPicture* asSkBigPicture() const override { return this; }
55 54
56 // Used by GrLayerHoister 55 // Used by GrLayerHoister
57 void partialPlayback(SkCanvas*, 56 void partialPlayback(SkCanvas*,
58 int start, 57 int start,
59 int stop, 58 int stop,
60 const SkMatrix& initialCTM) const; 59 const SkMatrix& initialCTM) const;
61 // Used by GrRecordReplaceDraw 60 // Used by GrRecordReplaceDraw
62 const SkBBoxHierarchy* bbh() const { return fBBH; } 61 const SkBBoxHierarchy* bbh() const { return fBBH; }
63 const SkRecord* record() const { return fRecord; } 62 const SkRecord* record() const { return fRecord; }
64 const AccelData* accelData() const { return fAccelData; } 63 const AccelData* accelData() const { return fAccelData; }
65 64
66 private: 65 private:
67 struct Analysis { 66 struct Analysis {
68 void init(const SkRecord&); 67 void init(const SkRecord&);
69 68
70 bool suitableForGpuRasterization(const char** reason) const; 69 bool suitableForGpuRasterization(const char** reason) const;
71 70
72 uint8_t fNumSlowPathsAndDashEffects; 71 uint8_t fNumSlowPathsAndDashEffects;
73 bool fWillPlaybackBitmaps : 1; 72 bool fWillPlaybackBitmaps : 1;
74 bool fHasText : 1;
75 }; 73 };
76 74
77 int numSlowPaths() const override; 75 int numSlowPaths() const override;
78 const Analysis& analysis() const; 76 const Analysis& analysis() const;
79 int drawableCount() const; 77 int drawableCount() const;
80 SkPicture const* const* drawablePicts() const; 78 SkPicture const* const* drawablePicts() const;
81 79
82 const SkRect fCullRect; 80 const SkRect fCullRect;
83 const size_t fApproxBytesUsedBySubPictures; 81 const size_t fApproxBytesUsedBySubPictures;
84 mutable SkOnce fAnalysisOnce; 82 mutable SkOnce fAnalysisOnce;
85 mutable Analysis fAnalysis; 83 mutable Analysis fAnalysis;
86 SkAutoTUnref<const SkRecord> fRecord; 84 SkAutoTUnref<const SkRecord> fRecord;
87 SkAutoTDelete<const SnapshotArray> fDrawablePicts; 85 SkAutoTDelete<const SnapshotArray> fDrawablePicts;
88 SkAutoTUnref<const SkBBoxHierarchy> fBBH; 86 SkAutoTUnref<const SkBBoxHierarchy> fBBH;
89 SkAutoTUnref<const AccelData> fAccelData; 87 SkAutoTUnref<const AccelData> fAccelData;
90 }; 88 };
91 89
92 #endif//SkBigPicture_DEFINED 90 #endif//SkBigPicture_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkBigPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698