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

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

Issue 1282883002: trivial CL to add drawBatch to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@batchfactory4
Patch Set: tidy Created 5 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 | « no previous file | src/gpu/GrDrawContext.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 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 GrDrawContext_DEFINED 8 #ifndef GrDrawContext_DEFINED
9 #define GrDrawContext_DEFINED 9 #define GrDrawContext_DEFINED
10 10
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 * the dash information (intervals, count, phase). 252 * the dash information (intervals, count, phase).
253 */ 253 */
254 void drawOval(GrRenderTarget*, 254 void drawOval(GrRenderTarget*,
255 const GrClip&, 255 const GrClip&,
256 const GrPaint& paint, 256 const GrPaint& paint,
257 const SkMatrix& viewMatrix, 257 const SkMatrix& viewMatrix,
258 const SkRect& oval, 258 const SkRect& oval,
259 const GrStrokeInfo& strokeInfo); 259 const GrStrokeInfo& strokeInfo);
260 260
261 261
262 /**
263 * Draws a batch
264 *
265 * @param paint describes how to color pixels.
266 * @param batch the batch to draw
267 */
268 void drawBatch(GrRenderTarget*, const GrClip&, const GrPaint&, GrBatch*);
269
262 private: 270 private:
263 friend class GrAtlasTextContext; // for access to drawBatch 271 friend class GrAtlasTextContext; // for access to drawBatch
264 friend class GrContext; // for ctor 272 friend class GrContext; // for ctor
265 273
266 GrDrawContext(GrContext*, GrDrawTarget*, const SkSurfaceProps&); 274 GrDrawContext(GrContext*, GrDrawTarget*, const SkSurfaceProps&);
267 275
268 GrTextContext* createTextContext(GrRenderTarget*, const SkSurfaceProps&); 276 GrTextContext* createTextContext(GrRenderTarget*, const SkSurfaceProps&);
269 277
270 // Checks if the context has been abandoned and if the rendertarget is owned by this context 278 // Checks if the context has been abandoned and if the rendertarget is owned by this context
271 bool prepareToDraw(GrRenderTarget* rt); 279 bool prepareToDraw(GrRenderTarget* rt);
(...skipping 11 matching lines...) Expand all
283 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch); 291 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch);
284 292
285 GrContext* fContext; // owning context -> no ref 293 GrContext* fContext; // owning context -> no ref
286 GrDrawTarget* fDrawTarget; 294 GrDrawTarget* fDrawTarget;
287 GrTextContext* fTextContext; // lazily created 295 GrTextContext* fTextContext; // lazily created
288 296
289 SkSurfaceProps fSurfaceProps; 297 SkSurfaceProps fSurfaceProps;
290 }; 298 };
291 299
292 #endif 300 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698