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

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

Issue 1406013006: Update Layer Hoisting to store its atlas texture in the resource cache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Android bug Created 5 years, 1 month 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
(...skipping 15 matching lines...) Expand all
26 SkMatrix fLocalMat; 26 SkMatrix fLocalMat;
27 }; 27 };
28 28
29 // This class collects the layer hoisting functionality in one place. 29 // This class collects the layer hoisting functionality in one place.
30 // For each picture rendering: 30 // For each picture rendering:
31 // FindLayersToHoist should be called once to collect the required layers 31 // FindLayersToHoist should be called once to collect the required layers
32 // DrawLayers should be called once to render them 32 // DrawLayers should be called once to render them
33 // UnlockLayers should be called once to allow the texture resources to be recy cled 33 // UnlockLayers should be called once to allow the texture resources to be recy cled
34 class GrLayerHoister { 34 class GrLayerHoister {
35 public: 35 public:
36 /** Attempt to reattach layers that may have been atlased in the past
37 */
38 static void Begin(GrContext* context);
39
40 /** Release cache resources
41 */
42 static void End(GrContext* context);
36 43
37 /** Find the layers in 'topLevelPicture' that can be atlased. Note that the discovered 44 /** Find the layers in 'topLevelPicture' that can be atlased. Note that the discovered
38 layers can be inside nested sub-pictures. 45 layers can be inside nested sub-pictures.
39 @param context Owner of the layer cache (the source of new layers) 46 @param context Owner of the layer cache (the source of new layers)
40 @param topLevelPicture The top-level picture that is about to be rendere d 47 @param topLevelPicture The top-level picture that is about to be rendere d
41 @param initialMat The CTM of the canvas into which the layers will be d rawn 48 @param initialMat The CTM of the canvas into which the layers will be d rawn
42 @param query The rectangle that is about to be drawn. 49 @param query The rectangle that is about to be drawn.
43 @param atlasedNeedRendering Out parameter storing the layers that 50 @param atlasedNeedRendering Out parameter storing the layers that
44 should be hoisted to the atlas 51 should be hoisted to the atlas
45 @param recycled Out parameter storing layers that are atlased but do not need rendering 52 @param recycled Out parameter storing layers that are atlased but do not need rendering
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 /** Update the GrTexture in 'layer' with its filtered version 115 /** Update the GrTexture in 'layer' with its filtered version
109 @param context Owner of the layer cache (and thus the layers) 116 @param context Owner of the layer cache (and thus the layers)
110 @param device Required by the filtering code 117 @param device Required by the filtering code
111 @param info Layer info for a layer needing filtering prior to bein g composited 118 @param info Layer info for a layer needing filtering prior to bein g composited
112 */ 119 */
113 static void FilterLayer(GrContext* context, SkGpuDevice* device, const GrHoi stedLayer& info); 120 static void FilterLayer(GrContext* context, SkGpuDevice* device, const GrHoi stedLayer& info);
114 121
115 }; 122 };
116 123
117 #endif 124 #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