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

Side by Side Diff: src/gpu/batches/GrClearBatch.h

Issue 2312173002: Revert of Improve usage of window rectangles (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_drawsinreducedclip
Patch Set: Created 4 years, 3 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/GrWindowRectsState.h ('k') | src/gpu/gl/GrGLGpu.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 GrClearBatch_DEFINED 8 #ifndef GrClearBatch_DEFINED
9 #define GrClearBatch_DEFINED 9 #define GrClearBatch_DEFINED
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 HasAABloat::kNo, IsZeroArea::kNo); 64 HasAABloat::kNo, IsZeroArea::kNo);
65 fRenderTarget.reset(rt); 65 fRenderTarget.reset(rt);
66 } 66 }
67 67
68 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { 68 bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
69 // This could be much more complicated. Currently we look at cases where the new clear 69 // This could be much more complicated. Currently we look at cases where the new clear
70 // contains the old clear, or when the new clear is a subset of the old clear and is the 70 // contains the old clear, or when the new clear is a subset of the old clear and is the
71 // same color. 71 // same color.
72 GrClearBatch* cb = t->cast<GrClearBatch>(); 72 GrClearBatch* cb = t->cast<GrClearBatch>();
73 SkASSERT(cb->fRenderTarget == fRenderTarget); 73 SkASSERT(cb->fRenderTarget == fRenderTarget);
74 if (!fClip.windowRectsState().cheapEqualTo(cb->fClip.windowRectsState()) ) {
75 return false;
76 }
77 if (cb->contains(this)) { 74 if (cb->contains(this)) {
78 fClip = cb->fClip; 75 fClip = cb->fClip;
79 this->replaceBounds(*t); 76 this->replaceBounds(*t);
80 fColor = cb->fColor; 77 fColor = cb->fColor;
81 return true; 78 return true;
82 } else if (cb->fColor == fColor && this->contains(cb)) { 79 } else if (cb->fColor == fColor && this->contains(cb)) {
83 return true; 80 return true;
84 } 81 }
85 return false; 82 return false;
86 } 83 }
(...skipping 12 matching lines...) Expand all
99 } 96 }
100 97
101 GrFixedClip fClip; 98 GrFixedClip fClip;
102 GrColor fColor; 99 GrColor fColor;
103 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget; 100 GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
104 101
105 typedef GrBatch INHERITED; 102 typedef GrBatch INHERITED;
106 }; 103 };
107 104
108 #endif 105 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrWindowRectsState.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698