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

Side by Side Diff: src/gpu/GrLayerCache.h

Issue 313613004: Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add staging entry point for Chromium and Android Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 GrLayerCache_DEFINED 8 #ifndef GrLayerCache_DEFINED
9 #define GrLayerCache_DEFINED 9 #define GrLayerCache_DEFINED
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // and one GrPlot (for the entire atlas). As such, the GrLayerCache 95 // and one GrPlot (for the entire atlas). As such, the GrLayerCache
96 // roughly combines the functionality of the GrFontCache and GrTextStrike 96 // roughly combines the functionality of the GrFontCache and GrTextStrike
97 // classes. 97 // classes.
98 class GrLayerCache { 98 class GrLayerCache {
99 public: 99 public:
100 GrLayerCache(GrGpu*); 100 GrLayerCache(GrGpu*);
101 ~GrLayerCache(); 101 ~GrLayerCache();
102 102
103 void freeAll(); 103 void freeAll();
104 104
105 GrCachedLayer* findLayerOrCreate(SkPicture* picture, int id); 105 GrCachedLayer* findLayerOrCreate(const SkPicture* picture, int id);
106 106
107 private: 107 private:
108 SkAutoTUnref<GrGpu> fGpu; 108 SkAutoTUnref<GrGpu> fGpu;
109 SkAutoTDelete<GrAtlasMgr> fAtlasMgr; // TODO: could lazily allocate 109 SkAutoTDelete<GrAtlasMgr> fAtlasMgr; // TODO: could lazily allocate
110 110
111 class PictureLayerKey; 111 class PictureLayerKey;
112 GrTHashTable<GrCachedLayer, PictureLayerKey, 7> fLayerHash; 112 GrTHashTable<GrCachedLayer, PictureLayerKey, 7> fLayerHash;
113 GrTAllocPool<GrCachedLayer> fLayerPool; 113 GrTAllocPool<GrCachedLayer> fLayerPool;
114 114
115 void init(); 115 void init();
116 GrCachedLayer* createLayer(SkPicture* picture, int id); 116 GrCachedLayer* createLayer(const SkPicture* picture, int id);
117 117
118 }; 118 };
119 119
120 #endif 120 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698