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

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

Issue 2241273003: Attempt to throw away rrect clips of rrects. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix int to scalar warnings 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
« no previous file with comments | « src/core/SkClipStack.cpp ('k') | src/gpu/GrClipStackClip.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 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 13 matching lines...) Expand all
24 GrClipStackClip(const SkClipStack* stack = nullptr, const SkIPoint* origin = nullptr) { 24 GrClipStackClip(const SkClipStack* stack = nullptr, const SkIPoint* origin = nullptr) {
25 this->reset(stack, origin); 25 this->reset(stack, origin);
26 } 26 }
27 27
28 void reset(const SkClipStack* stack = nullptr, const SkIPoint* origin = null ptr) { 28 void reset(const SkClipStack* stack = nullptr, const SkIPoint* origin = null ptr) {
29 fOrigin = origin ? *origin : SkIPoint::Make(0, 0); 29 fOrigin = origin ? *origin : SkIPoint::Make(0, 0);
30 fStack.reset(SkSafeRef(stack)); 30 fStack.reset(SkSafeRef(stack));
31 } 31 }
32 32
33 bool quickContains(const SkRect&) const final; 33 bool quickContains(const SkRect&) const final;
34 bool quickContains(const SkRRect&) const final;
34 void getConservativeBounds(int width, int height, SkIRect* devResult, 35 void getConservativeBounds(int width, int height, SkIRect* devResult,
35 bool* isIntersectionOfRects) const final; 36 bool* isIntersectionOfRects) const final;
36 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett ings, 37 bool apply(GrContext*, GrDrawContext*, bool useHWAA, bool hasUserStencilSett ings,
37 GrAppliedClip* out) const final; 38 GrAppliedClip* out) const final;
38 39
39 private: 40 private:
40 static bool PathNeedsSWRenderer(GrContext* context, 41 static bool PathNeedsSWRenderer(GrContext* context,
41 bool hasUserStencilSettings, 42 bool hasUserStencilSettings,
42 const GrDrawContext*, 43 const GrDrawContext*,
43 const SkMatrix& viewMatrix, 44 const SkMatrix& viewMatrix,
(...skipping 25 matching lines...) Expand all
69 const GrReducedClip::ElementList& elements); 70 const GrReducedClip::ElementList& elements);
70 71
71 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key, 72 static GrTexture* CreateCachedMask(int width, int height, const GrUniqueKey& key,
72 bool renderTarget); 73 bool renderTarget);
73 74
74 SkIPoint fOrigin; 75 SkIPoint fOrigin;
75 SkAutoTUnref<const SkClipStack> fStack; 76 SkAutoTUnref<const SkClipStack> fStack;
76 }; 77 };
77 78
78 #endif // GrClipStackClip_DEFINED 79 #endif // GrClipStackClip_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkClipStack.cpp ('k') | src/gpu/GrClipStackClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698