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

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

Issue 1563703004: Make a single GrSingleOwner in GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 11 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/private/GrSingleOwner.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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 int numColorSamples() const { return fRenderTarget->numColorSamples(); } 276 int numColorSamples() const { return fRenderTarget->numColorSamples(); }
277 277
278 GrRenderTarget* accessRenderTarget() { return fRenderTarget; } 278 GrRenderTarget* accessRenderTarget() { return fRenderTarget; }
279 279
280 private: 280 private:
281 friend class GrAtlasTextBlob; // for access to drawBatch 281 friend class GrAtlasTextBlob; // for access to drawBatch
282 friend class GrDrawingManager; // for ctor 282 friend class GrDrawingManager; // for ctor
283 283
284 SkDEBUGCODE(void validate() const;) 284 SkDEBUGCODE(void validate() const;)
285 285
286 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf aceProps); 286 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf aceProps,
287 GrSingleOwner*);
287 288
288 void internalDrawPath(GrPipelineBuilder*, 289 void internalDrawPath(GrPipelineBuilder*,
289 const SkMatrix& viewMatrix, 290 const SkMatrix& viewMatrix,
290 GrColor, 291 GrColor,
291 bool useAA, 292 bool useAA,
292 const SkPath&, 293 const SkPath&,
293 const GrStrokeInfo&); 294 const GrStrokeInfo&);
294 295
295 // This entry point allows the GrTextContext-derived classes to add their ba tches to 296 // This entry point allows the GrTextContext-derived classes to add their ba tches to
296 // the drawTarget. 297 // the drawTarget.
297 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch); 298 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrDrawBatch* batch);
298 299
299 GrDrawTarget* getDrawTarget(); 300 GrDrawTarget* getDrawTarget();
300 301
301 GrDrawingManager* fDrawingManager; 302 GrDrawingManager* fDrawingManager;
302 GrRenderTarget* fRenderTarget; 303 GrRenderTarget* fRenderTarget;
303 304
304 // In MDB-mode the drawTarget can be closed by some other drawContext that h as picked 305 // In MDB-mode the drawTarget can be closed by some other drawContext that h as picked
305 // it up. For this reason, the drawTarget should only ever be accessed via ' getDrawTarget'. 306 // it up. For this reason, the drawTarget should only ever be accessed via ' getDrawTarget'.
306 GrDrawTarget* fDrawTarget; 307 GrDrawTarget* fDrawTarget;
307 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana ger 308 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana ger
308 309
309 SkSurfaceProps fSurfaceProps; 310 SkSurfaceProps fSurfaceProps;
310 311
311 // In debug builds we guard against improper thread handling 312 // In debug builds we guard against improper thread handling
312 SkDEBUGCODE(mutable GrSingleOwner fSingleOwner;) 313 mutable GrSingleOwner* fSingleOwner;
313 }; 314 };
314 315
315 #endif 316 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | include/private/GrSingleOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698