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

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

Issue 539693002: Remove use of EXPERIMENTAL_getActiveOps from layer hoisting code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment & move init into loop Created 6 years, 3 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 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 class GrAccelData; 14 class GrAccelData;
15 struct GrCachedLayer; 15 struct GrCachedLayer;
16 struct SkRect; 16 struct SkRect;
17 17
18 // This class collects the layer hoisting functionality in one place. 18 // This class collects the layer hoisting functionality in one place.
19 // For each picture rendering: 19 // For each picture rendering:
20 // FindLayersToHoist should be called once to collect the required layers 20 // FindLayersToHoist should be called once to collect the required layers
21 // DrawLayers should be called once to render them 21 // DrawLayers should be called once to render them
22 // UnlockLayers should be called once to allow the texture resources to be recy cled 22 // UnlockLayers should be called once to allow the texture resources to be recy cled
23 class GrLayerHoister { 23 class GrLayerHoister {
24 public: 24 public:
25 /** Find the layers in 'gpuData' that need hoisting. 25 /** Find the layers in 'gpuData' that need hoisting.
26 @param gpuData Acceleration structure containing layer information for a picture 26 @param gpuData Acceleration structure containing layer information for a picture
27 @param ops If a BBH is being used the operations about to be execut ed; NULL otherwise.
28 @param query The rectangle that is about to be drawn. 27 @param query The rectangle that is about to be drawn.
29 @param pullForward A gpuData->numSaveLayers -sized Boolean array indicat ing 28 @param pullForward A gpuData->numSaveLayers -sized Boolean array indicat ing
30 which layers are to be hoisted 29 which layers are to be hoisted
31 Return true if any layers are suitable for hoisting; false otherwise 30 Return true if any layers are suitable for hoisting; false otherwise
32 */ 31 */
33 static bool FindLayersToHoist(const GrAccelData *gpuData, 32 static bool FindLayersToHoist(const GrAccelData *gpuData,
34 const SkPicture::OperationList* ops,
35 const SkRect& query, 33 const SkRect& query,
36 bool pullForward[]); 34 bool pullForward[]);
37 35
38 /** Draw the specified layers of 'picture' into either the atlas or free 36 /** Draw the specified layers of 'picture' into either the atlas or free
39 floating textures. 37 floating textures.
40 @param picture The picture containing the layers 38 @param picture The picture containing the layers
41 @param atlased The layers to be drawn into the atlas 39 @param atlased The layers to be drawn into the atlas
42 @param nonAtlased The layers to be drawn into their own textures 40 @param nonAtlased The layers to be drawn into their own textures
43 */ 41 */
44 static void DrawLayers(const SkPicture* picture, 42 static void DrawLayers(const SkPicture* picture,
45 const SkTDArray<GrCachedLayer*>& atlased, 43 const SkTDArray<GrCachedLayer*>& atlased,
46 const SkTDArray<GrCachedLayer*>& nonAtlased); 44 const SkTDArray<GrCachedLayer*>& nonAtlased);
47 45
48 /** Unlock all the layers associated with picture in the layer cache. 46 /** Unlock all the layers associated with picture in the layer cache.
49 @param layerCache holder of the locked layers 47 @param layerCache holder of the locked layers
50 @pmara picture the source of the locked layers 48 @pmara picture the source of the locked layers
51 */ 49 */
52 static void UnlockLayers(GrLayerCache* layerCache, const SkPicture* picture) ; 50 static void UnlockLayers(GrLayerCache* layerCache, const SkPicture* picture) ;
53 }; 51 };
54 52
55 #endif 53 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/gpu/GrLayerHoister.cpp » ('j') | src/gpu/SkGpuDevice.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698