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

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

Issue 2253293003: Revert of Reduce window rectangles cap to 8 (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
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | no next file » | 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 7
8 #ifndef GrWindowRectangles_DEFINED 8 #ifndef GrWindowRectangles_DEFINED
9 #define GrWindowRectangles_DEFINED 9 #define GrWindowRectangles_DEFINED
10 10
11 #include "GrNonAtomicRef.h" 11 #include "GrNonAtomicRef.h"
12 #include "SkRect.h" 12 #include "SkRect.h"
13 13
14 class GrWindowRectangles { 14 class GrWindowRectangles {
15 public: 15 public:
16 constexpr static int kMaxWindows = 8; 16 constexpr static int kMaxWindows = 16;
17 17
18 enum class Mode : bool { 18 enum class Mode : bool {
19 kExclusive, 19 kExclusive,
20 kInclusive 20 kInclusive
21 }; 21 };
22 22
23 GrWindowRectangles(Mode mode = Mode::kExclusive) : fMode(mode), fCount(0) {} 23 GrWindowRectangles(Mode mode = Mode::kExclusive) : fMode(mode), fCount(0) {}
24 GrWindowRectangles(const GrWindowRectangles& that) : fCount(0) { *this = tha t; } 24 GrWindowRectangles(const GrWindowRectangles& that) : fCount(0) { *this = tha t; }
25 ~GrWindowRectangles() { SkSafeUnref(this->rec()); } 25 ~GrWindowRectangles() { SkSafeUnref(this->rec()); }
26 26
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (fMode != that.fMode || fCount != that.fCount) { 101 if (fMode != that.fMode || fCount != that.fCount) {
102 return false; 102 return false;
103 } 103 }
104 if (fCount > kNumLocalWindows && fRec == that.fRec) { 104 if (fCount > kNumLocalWindows && fRec == that.fRec) {
105 return true; 105 return true;
106 } 106 }
107 return !fCount || !memcmp(this->data(), that.data(), sizeof(SkIRect) * fCoun t); 107 return !fCount || !memcmp(this->data(), that.data(), sizeof(SkIRect) * fCoun t);
108 } 108 }
109 109
110 #endif 110 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698