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

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

Issue 2222873002: Encapsulate GrReducedClip result in class members (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 2016 Google Inc. 2 * Copyright 2016 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 #ifndef GrClipStackClip_DEFINED 7 #ifndef GrClipStackClip_DEFINED
8 #define GrClipStackClip_DEFINED 8 #define GrClipStackClip_DEFINED
9 9
10 #include "GrClip.h" 10 #include "GrClip.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 bool hasUserStencilSettings, 45 bool hasUserStencilSettings,
46 const GrDrawContext*, 46 const GrDrawContext*,
47 const SkMatrix& viewMatrix, 47 const SkMatrix& viewMatrix,
48 const SkClipStack::Element* element, 48 const SkClipStack::Element* element,
49 GrPathRenderer** prOut, 49 GrPathRenderer** prOut,
50 bool needsStencil); 50 bool needsStencil);
51 51
52 // Draws the clip into the stencil buffer 52 // Draws the clip into the stencil buffer
53 static bool CreateStencilClipMask(GrContext*, 53 static bool CreateStencilClipMask(GrContext*,
54 GrDrawContext*, 54 GrDrawContext*,
55 int32_t elementsGenID, 55 const GrReducedClip&,
56 GrReducedClip::InitialState initialState,
57 const GrReducedClip::ElementList& elements ,
58 const SkIRect& clipSpaceIBounds,
59 const SkIPoint& clipSpaceToStencilOffset); 56 const SkIPoint& clipSpaceToStencilOffset);
60 57
61 // Creates an alpha mask of the clip. The mask is a rasterization of element s through the 58 // Creates an alpha mask of the clip. The mask is a rasterization of element s through the
62 // rect specified by clipSpaceIBounds. 59 // rect specified by clipSpaceIBounds.
63 static sk_sp<GrTexture> CreateAlphaClipMask(GrContext*, 60 static sk_sp<GrTexture> CreateAlphaClipMask(GrContext*,
64 int32_t elementsGenID, 61 const GrReducedClip&,
65 GrReducedClip::InitialState init ialState, 62 const SkVector& clipToMaskOffset );
66 const GrReducedClip::ElementList & elements,
67 const SkVector& clipToMaskOffset ,
68 const SkIRect& clipSpaceIBounds) ;
69 63
70 // Similar to createAlphaClipMask but it rasterizes in SW and uploads to the result texture. 64 // Similar to createAlphaClipMask but it rasterizes in SW and uploads to the result texture.
71 static sk_sp<GrTexture> CreateSoftwareClipMask(GrTextureProvider*, 65 static sk_sp<GrTexture> CreateSoftwareClipMask(GrTextureProvider*,
72 int32_t elementsGenID, 66 const GrReducedClip&,
73 GrReducedClip::InitialState i nitialState, 67 const SkVector& clipToMaskOff set);
74 const GrReducedClip::ElementL ist& elements,
75 const SkVector& clipToMaskOff set,
76 const SkIRect& clipSpaceIBoun ds);
77 68
78 static bool UseSWOnlyPath(GrContext*, 69 static bool UseSWOnlyPath(GrContext*,
79 bool hasUserStencilSettings, 70 bool hasUserStencilSettings,
80 const GrDrawContext*, 71 const GrDrawContext*,
81 const SkVector& clipToMaskOffset, 72 const SkVector& clipToMaskOffset,
82 const GrReducedClip::ElementList& elements); 73 const GrReducedClip::ElementList& elements);
83 74
84 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key, 75 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key,
85 bool renderTarget); 76 bool renderTarget);
86 77
87 SkIPoint fOrigin; 78 SkIPoint fOrigin;
88 SkAutoTUnref<const SkClipStack> fStack; 79 SkAutoTUnref<const SkClipStack> fStack;
89 }; 80 };
90 81
91 #endif // GrClipStackClip_DEFINED 82 #endif // GrClipStackClip_DEFINED
OLDNEW
« include/gpu/GrClip.h ('K') | « include/gpu/GrClip.h ('k') | src/gpu/GrClipStackClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698