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

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

Issue 1413673002: Remove DrawingMgr shims from GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix names in comments 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 | « include/gpu/GrContext.h ('k') | src/effects/SkGpuBlurUtils.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
11 #include "GrColor.h" 11 #include "GrColor.h"
12 #include "SkRefCnt.h" 12 #include "SkRefCnt.h"
13 #include "SkSurfaceProps.h" 13 #include "SkSurfaceProps.h"
14 14
15 class GrClip; 15 class GrClip;
16 class GrContext; 16 class GrContext;
17 class GrDrawBatch; 17 class GrDrawBatch;
18 class GrDrawingManager;
18 class GrDrawTarget; 19 class GrDrawTarget;
19 class GrPaint; 20 class GrPaint;
20 class GrPathProcessor; 21 class GrPathProcessor;
21 class GrPathRange; 22 class GrPathRange;
22 class GrPathRangeDraw; 23 class GrPathRangeDraw;
23 class GrPipelineBuilder; 24 class GrPipelineBuilder;
24 class GrRenderTarget; 25 class GrRenderTarget;
25 class GrStrokeInfo; 26 class GrStrokeInfo;
26 class GrSurface; 27 class GrSurface;
27 class GrTextContext; 28 class GrTextContext;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 /** 246 /**
246 * Draws a batch 247 * Draws a batch
247 * 248 *
248 * @param paint describes how to color pixels. 249 * @param paint describes how to color pixels.
249 * @param batch the batch to draw 250 * @param batch the batch to draw
250 */ 251 */
251 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); 252 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*);
252 253
253 private: 254 private:
254 friend class GrAtlasTextContext; // for access to drawBatch 255 friend class GrAtlasTextContext; // for access to drawBatch
255 friend class GrContext; // for ctor 256 friend class GrDrawingManager; // for ctor
256 257
257 SkDEBUGCODE(void validate() const;) 258 SkDEBUGCODE(void validate() const;)
258 259
259 GrDrawContext(GrContext*, GrRenderTarget*, const SkSurfaceProps* surfaceProp s); 260 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf aceProps);
260 261
261 void internalDrawPath(GrDrawTarget*, 262 void internalDrawPath(GrDrawTarget*,
262 GrPipelineBuilder*, 263 GrPipelineBuilder*,
263 const SkMatrix& viewMatrix, 264 const SkMatrix& viewMatrix,
264 GrColor, 265 GrColor,
265 bool useAA, 266 bool useAA,
266 const SkPath&, 267 const SkPath&,
267 const GrStrokeInfo&); 268 const GrStrokeInfo&);
268 269
269 // This entry point allows the GrTextContext-derived classes to add their ba tches to 270 // This entry point allows the GrTextContext-derived classes to add their ba tches to
270 // the drawTarget. 271 // the drawTarget.
271 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); 272 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch);
272 273
273 GrDrawTarget* getDrawTarget(); 274 GrDrawTarget* getDrawTarget();
274 275
275 GrContext* fContext; // owning context -> no ref 276 GrDrawingManager* fDrawingManager;
276 GrRenderTarget* fRenderTarget; 277 GrRenderTarget* fRenderTarget;
277 278
278 // In MDB-mode the drawTarget can be closed by some other drawContext that h as picked 279 // In MDB-mode the drawTarget can be closed by some other drawContext that h as picked
279 // it up. For this reason, the drawTarget should only ever be accessed via ' getDrawTarget'. 280 // it up. For this reason, the drawTarget should only ever be accessed via ' getDrawTarget'.
280 GrDrawTarget* fDrawTarget; 281 GrDrawTarget* fDrawTarget;
281 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMg r 282 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana ger
282 283
283 SkSurfaceProps fSurfaceProps; 284 SkSurfaceProps fSurfaceProps;
284 }; 285 };
285 286
286 #endif 287 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698