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

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

Issue 1355353002: Create GrDraw and start fast pathing src over rects (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerect2
Patch Set: tweaks Created 5 years, 2 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/SkGpuDevice.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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 GrContext* context() const { return fDrawTarget->fContext; } 195 GrContext* context() const { return fDrawTarget->fContext; }
196 GrResourceProvider* resourceProvider() const { return fDrawTarget->fReso urceProvider; } 196 GrResourceProvider* resourceProvider() const { return fDrawTarget->fReso urceProvider; }
197 GrDrawTarget* fDrawTarget; 197 GrDrawTarget* fDrawTarget;
198 friend class GrClipMaskManager; 198 friend class GrClipMaskManager;
199 }; 199 };
200 200
201 const CMMAccess cmmAccess() { return CMMAccess(this); } 201 const CMMAccess cmmAccess() { return CMMAccess(this); }
202 202
203 GrBatch* lastBatch() {
204 if (fBatches.count()) {
205 return fBatches.back();
206 } else {
207 return nullptr;
208 }
209 }
210
203 private: 211 private:
204 void recordBatch(GrBatch*); 212 void recordBatch(GrBatch*);
205 bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder, 213 bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder,
206 const GrScissorState* scissor, 214 const GrScissorState* scissor,
207 GrDrawBatch* batch); 215 GrDrawBatch* batch);
208 216
209 // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required 217 // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
210 // but couldn't be made. Otherwise, returns true. This method needs to be p rotected because it 218 // but couldn't be made. Otherwise, returns true. This method needs to be p rotected because it
211 // needs to be accessed by GLPrograms to setup a correct drawstate 219 // needs to be accessed by GLPrograms to setup a correct drawstate
212 bool setupDstReadIfNecessary(const GrPipelineBuilder&, 220 bool setupDstReadIfNecessary(const GrPipelineBuilder&,
(...skipping 23 matching lines...) Expand all
236 GrContext* fContext; 244 GrContext* fContext;
237 GrGpu* fGpu; 245 GrGpu* fGpu;
238 GrResourceProvider* fResourceProvider; 246 GrResourceProvider* fResourceProvider;
239 bool fFlushing; 247 bool fFlushing;
240 GrBatchToken fLastFlushToken; 248 GrBatchToken fLastFlushToken;
241 249
242 typedef SkRefCnt INHERITED; 250 typedef SkRefCnt INHERITED;
243 }; 251 };
244 252
245 #endif 253 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698