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

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

Issue 2125333002: Add choke point for modifying non-AA rect draws (e.g., applying clipping) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix infinite optimization loop Created 4 years, 5 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
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawContext.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 2012 Google Inc. 2 * Copyright 2012 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 GrClipMaskManager_DEFINED 7 #ifndef GrClipMaskManager_DEFINED
8 #define GrClipMaskManager_DEFINED 8 #define GrClipMaskManager_DEFINED
9 9
10 #include "GrReducedClip.h" 10 #include "GrReducedClip.h"
(...skipping 29 matching lines...) Expand all
40 /** 40 /**
41 * Creates a clip mask if necessary as a stencil buffer or alpha texture 41 * Creates a clip mask if necessary as a stencil buffer or alpha texture
42 * and sets the GrGpu's scissor and stencil state. If the return is false 42 * and sets the GrGpu's scissor and stencil state. If the return is false
43 * then the draw can be skipped. devBounds is optional but can help optimize 43 * then the draw can be skipped. devBounds is optional but can help optimize
44 * clipping. 44 * clipping.
45 */ 45 */
46 static bool SetupClipping(GrContext*, const GrPipelineBuilder&, GrDrawContex t*, 46 static bool SetupClipping(GrContext*, const GrPipelineBuilder&, GrDrawContex t*,
47 const GrClipStackClip&, const SkRect* devBounds, G rAppliedClip*); 47 const GrClipStackClip&, const SkRect* devBounds, G rAppliedClip*);
48 48
49 private: 49 private:
50 static void DrawNonAARect(GrDrawContext* drawContext,
51 const GrFixedClip& clip,
52 const SkMatrix& viewMatrix,
53 const SkRect& rect,
54 bool isAA,
55 const GrUserStencilSettings* stencilSettings);
56
57 static bool PathNeedsSWRenderer(GrContext* context, 50 static bool PathNeedsSWRenderer(GrContext* context,
58 bool hasUserStencilSettings, 51 bool hasUserStencilSettings,
59 const GrDrawContext*, 52 const GrDrawContext*,
60 const SkMatrix& viewMatrix, 53 const SkMatrix& viewMatrix,
61 const SkClipStack::Element* element, 54 const SkClipStack::Element* element,
62 GrPathRenderer** prOut, 55 GrPathRenderer** prOut,
63 bool needsStencil); 56 bool needsStencil);
64 57
65 // Draws the clip into the stencil buffer 58 // Draws the clip into the stencil buffer
66 static bool CreateStencilClipMask(GrContext*, 59 static bool CreateStencilClipMask(GrContext*,
(...skipping 25 matching lines...) Expand all
92 const GrPipelineBuilder&, 85 const GrPipelineBuilder&,
93 const GrDrawContext*, 86 const GrDrawContext*,
94 const SkVector& clipToMaskOffset, 87 const SkVector& clipToMaskOffset,
95 const GrReducedClip::ElementList& elements); 88 const GrReducedClip::ElementList& elements);
96 89
97 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key, 90 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key,
98 bool renderTarget); 91 bool renderTarget);
99 }; 92 };
100 93
101 #endif // GrClipMaskManager_DEFINED 94 #endif // GrClipMaskManager_DEFINED
OLDNEW
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698