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

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

Issue 2136643002: Revert of 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: 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
50 static bool PathNeedsSWRenderer(GrContext* context, 57 static bool PathNeedsSWRenderer(GrContext* context,
51 bool hasUserStencilSettings, 58 bool hasUserStencilSettings,
52 const GrDrawContext*, 59 const GrDrawContext*,
53 const SkMatrix& viewMatrix, 60 const SkMatrix& viewMatrix,
54 const SkClipStack::Element* element, 61 const SkClipStack::Element* element,
55 GrPathRenderer** prOut, 62 GrPathRenderer** prOut,
56 bool needsStencil); 63 bool needsStencil);
57 64
58 // Draws the clip into the stencil buffer 65 // Draws the clip into the stencil buffer
59 static bool CreateStencilClipMask(GrContext*, 66 static bool CreateStencilClipMask(GrContext*,
(...skipping 25 matching lines...) Expand all
85 const GrPipelineBuilder&, 92 const GrPipelineBuilder&,
86 const GrDrawContext*, 93 const GrDrawContext*,
87 const SkVector& clipToMaskOffset, 94 const SkVector& clipToMaskOffset,
88 const GrReducedClip::ElementList& elements); 95 const GrReducedClip::ElementList& elements);
89 96
90 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key, 97 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key,
91 bool renderTarget); 98 bool renderTarget);
92 }; 99 };
93 100
94 #endif // GrClipMaskManager_DEFINED 101 #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