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

Side by Side Diff: include/gpu/GrTypesPriv.h

Issue 913693002: Clean up clipping code a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix assert Created 5 years, 10 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 2013 Google Inc. 2 * Copyright 2013 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 GrTypesPriv_DEFINED 8 #ifndef GrTypesPriv_DEFINED
9 #define GrTypesPriv_DEFINED 9 #define GrTypesPriv_DEFINED
10 10
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 }; 242 };
243 243
244 struct GrScissorState { 244 struct GrScissorState {
245 GrScissorState() : fEnabled(false) {} 245 GrScissorState() : fEnabled(false) {}
246 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } 246 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; }
247 bool operator==(const GrScissorState& other) const { 247 bool operator==(const GrScissorState& other) const {
248 return fEnabled == other.fEnabled && 248 return fEnabled == other.fEnabled &&
249 (false == fEnabled || fRect == other.fRect); 249 (false == fEnabled || fRect == other.fRect);
250 } 250 }
251 bool operator!=(const GrScissorState& other) const { return !(*this == other ); } 251 bool operator!=(const GrScissorState& other) const { return !(*this == other ); }
252
253 bool enabled() const { return fEnabled; }
254 const SkIRect& rect() const { return fRect; }
255
256 private:
252 bool fEnabled; 257 bool fEnabled;
253 SkIRect fRect; 258 SkIRect fRect;
254 }; 259 };
255 260
256 #endif 261 #endif
OLDNEW
« no previous file with comments | « include/core/SkClipStack.h ('k') | src/core/SkClipStack.cpp » ('j') | src/core/SkClipStack.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698