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

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

Issue 1406173003: Loosen requirement that there be only one GrDrawTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comment 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') | include/gpu/GrRenderTarget.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 GrDrawContext_DEFINED 8 #ifndef GrDrawContext_DEFINED
9 #define GrDrawContext_DEFINED 9 #define GrDrawContext_DEFINED
10 10
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 * @param batch the batch to draw 249 * @param batch the batch to draw
250 */ 250 */
251 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); 251 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*);
252 252
253 private: 253 private:
254 friend class GrAtlasTextContext; // for access to drawBatch 254 friend class GrAtlasTextContext; // for access to drawBatch
255 friend class GrContext; // for ctor 255 friend class GrContext; // for ctor
256 256
257 SkDEBUGCODE(void validate() const;) 257 SkDEBUGCODE(void validate() const;)
258 258
259 GrDrawContext(GrContext*, GrRenderTarget*, GrDrawTarget*, const SkSurfacePro ps* surfaceProps); 259 GrDrawContext(GrContext*, GrRenderTarget*, const SkSurfaceProps* surfaceProp s);
260 260
261 void internalDrawPath(GrDrawTarget*, 261 void internalDrawPath(GrDrawTarget*,
262 GrPipelineBuilder*, 262 GrPipelineBuilder*,
263 const SkMatrix& viewMatrix, 263 const SkMatrix& viewMatrix,
264 GrColor, 264 GrColor,
265 bool useAA, 265 bool useAA,
266 const SkPath&, 266 const SkPath&,
267 const GrStrokeInfo&); 267 const GrStrokeInfo&);
268 268
269 // This entry point allows the GrTextContext-derived classes to add their ba tches to 269 // This entry point allows the GrTextContext-derived classes to add their ba tches to
270 // the drawTarget. 270 // the drawTarget.
271 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); 271 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch);
272 272
273 GrDrawTarget* getDrawTarget();
274
273 GrContext* fContext; // owning context -> no ref 275 GrContext* fContext; // owning context -> no ref
274 GrRenderTarget* fRenderTarget; 276 GrRenderTarget* fRenderTarget;
277
278 // 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'.
275 GrDrawTarget* fDrawTarget; 280 GrDrawTarget* fDrawTarget;
276 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMg r 281 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMg r
277 282
278 SkSurfaceProps fSurfaceProps; 283 SkSurfaceProps fSurfaceProps;
279 }; 284 };
280 285
281 #endif 286 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/gpu/GrRenderTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698