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

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

Issue 2145643003: Move GrDrawTarget::clear logic into GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix typo 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 | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.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 2010 Google Inc. 2 * Copyright 2010 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 GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void prepareBatches(GrBatchFlushState* flushState); 99 void prepareBatches(GrBatchFlushState* flushState);
100 void drawBatches(GrBatchFlushState* flushState); 100 void drawBatches(GrBatchFlushState* flushState);
101 101
102 /** 102 /**
103 * Gets the capabilities of the draw target. 103 * Gets the capabilities of the draw target.
104 */ 104 */
105 const GrCaps* caps() const { return fGpu->caps(); } 105 const GrCaps* caps() const { return fGpu->caps(); }
106 106
107 void drawBatch(const GrPipelineBuilder&, GrDrawContext*, const GrClip&, GrDr awBatch*); 107 void drawBatch(const GrPipelineBuilder&, GrDrawContext*, const GrClip&, GrDr awBatch*);
108 108
109 void addBatch(sk_sp<GrBatch>);
110
109 /** 111 /**
110 * Draws path into the stencil buffer. The fill must be either even/odd or 112 * Draws path into the stencil buffer. The fill must be either even/odd or
111 * winding (not inverse or hairline). It will respect the HW antialias flag 113 * winding (not inverse or hairline). It will respect the HW antialias flag
112 * on the GrPipelineBuilder (if possible in the 3D API). Note, we will neve r have an inverse 114 * on the GrPipelineBuilder (if possible in the 3D API). Note, we will neve r have an inverse
113 * fill with stencil path 115 * fill with stencil path
114 */ 116 */
115 void stencilPath(const GrPipelineBuilder&, GrDrawContext*, 117 void stencilPath(const GrPipelineBuilder&, GrDrawContext*,
116 const GrClip&, const SkMatrix& viewMatrix, 118 const GrClip&, const SkMatrix& viewMatrix,
117 const GrPath*, GrPathRendering::FillType); 119 const GrPath*, GrPathRendering::FillType);
118 120
119 /**
120 * Clear the passed in drawContext. Ignores the GrPipelineBuilder and clip. Clears the whole
121 * thing if rect is nullptr, otherwise just the rect. If canIgnoreRect is se t then the entire
122 * drawContext can be optionally cleared.
123 */
124 void clear(const SkIRect* rect,
125 GrColor color,
126 bool canIgnoreRect,
127 GrDrawContext*);
128
129 /** Discards the contents render target. */ 121 /** Discards the contents render target. */
130 void discard(GrRenderTarget*); 122 void discard(GrRenderTarget*);
131 123
132 /** 124 /**
133 * Copies a pixel rectangle from one surface to another. This call may final ize 125 * Copies a pixel rectangle from one surface to another. This call may final ize
134 * reserved vertex/index data (as though a draw call was made). The src pixe ls 126 * reserved vertex/index data (as though a draw call was made). The src pixe ls
135 * copied are specified by srcRect. They are copied to a rect of the same 127 * copied are specified by srcRect. They are copied to a rect of the same
136 * size in dst with top left at dstPoint. If the src rect is clipped by the 128 * size in dst with top left at dstPoint. If the src rect is clipped by the
137 * src bounds then pixel values in the dst rect corresponding to area clipp ed 129 * src bounds then pixel values in the dst rect corresponding to area clipp ed
138 * by the src rect are not overwritten. This method is not guaranteed to suc ceed 130 * by the src rect are not overwritten. This method is not guaranteed to suc ceed
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 bool fDrawBatchBounds; 228 bool fDrawBatchBounds;
237 int fMaxBatchLookback; 229 int fMaxBatchLookback;
238 int fMaxBatchLookahead; 230 int fMaxBatchLookahead;
239 231
240 SkAutoTDelete<gr_instanced::InstancedRendering> fInstancedRendering; 232 SkAutoTDelete<gr_instanced::InstancedRendering> fInstancedRendering;
241 233
242 typedef SkRefCnt INHERITED; 234 typedef SkRefCnt INHERITED;
243 }; 235 };
244 236
245 #endif 237 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698