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

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

Issue 769533004: Fuse GrReplacements and GrLayerCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clang Created 6 years 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 | « src/gpu/GrLayerCache.cpp ('k') | src/gpu/GrLayerHoister.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 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 GrLayerHoister_DEFINED 8 #ifndef GrLayerHoister_DEFINED
9 #define GrLayerHoister_DEFINED 9 #define GrLayerHoister_DEFINED
10 10
11 #include "SkPicture.h" 11 #include "SkPicture.h"
12 #include "SkTDArray.h" 12 #include "SkTDArray.h"
13 13
14 struct GrCachedLayer; 14 struct GrCachedLayer;
15 class GrReplacements; 15 class GrReplacements;
16 struct SkRect; 16 struct SkRect;
17 17
18 class GrHoistedLayer { 18 class GrHoistedLayer {
19 public: 19 public:
20 const SkPicture* fPicture; // the picture that actually contains the layer 20 const SkPicture* fPicture; // the picture that actually contains the layer
21 // (not necessarily the top-most picture) 21 // (not necessarily the top-most picture)
22 GrCachedLayer* fLayer; 22 GrCachedLayer* fLayer;
23 SkIPoint fOffset;
24 SkMatrix fInitialMat; 23 SkMatrix fInitialMat;
25 SkMatrix fPreMat; 24 SkMatrix fPreMat;
26 SkMatrix fLocalMat; 25 SkMatrix fLocalMat;
27 }; 26 };
28 27
29 // This class collects the layer hoisting functionality in one place. 28 // This class collects the layer hoisting functionality in one place.
30 // For each picture rendering: 29 // For each picture rendering:
31 // FindLayersToHoist should be called once to collect the required layers 30 // FindLayersToHoist should be called once to collect the required layers
32 // DrawLayers should be called once to render them 31 // DrawLayers should be called once to render them
33 // UnlockLayers should be called once to allow the texture resources to be recy cled 32 // UnlockLayers should be called once to allow the texture resources to be recy cled
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 static void UnlockLayers(GrContext* context, const SkTDArray<GrHoistedLayer> & layers); 98 static void UnlockLayers(GrContext* context, const SkTDArray<GrHoistedLayer> & layers);
100 99
101 /** Forceably remove all cached layers and release the atlas. Useful for deb ugging and timing. 100 /** Forceably remove all cached layers and release the atlas. Useful for deb ugging and timing.
102 This is only functional when GR_CACHE_HOISTED_LAYERS is set to 1 in GrLa yerCache.h 101 This is only functional when GR_CACHE_HOISTED_LAYERS is set to 1 in GrLa yerCache.h
103 @param context Owner of the layer cache (and thus the layers) 102 @param context Owner of the layer cache (and thus the layers)
104 */ 103 */
105 static void PurgeCache(GrContext* context); 104 static void PurgeCache(GrContext* context);
106 }; 105 };
107 106
108 #endif 107 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrLayerCache.cpp ('k') | src/gpu/GrLayerHoister.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698