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

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

Issue 1486923004: Retract GrRenderTarget a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/GrClip.h ('k') | src/gpu/GrAtlasTextContext.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
11 #include "GrColor.h" 11 #include "GrColor.h"
12 #include "GrRenderTarget.h"
12 #include "SkRefCnt.h" 13 #include "SkRefCnt.h"
13 #include "SkSurfaceProps.h" 14 #include "SkSurfaceProps.h"
14 15
15 class GrClip; 16 class GrClip;
16 class GrContext; 17 class GrContext;
17 class GrDrawBatch; 18 class GrDrawBatch;
18 class GrDrawingManager; 19 class GrDrawingManager;
19 class GrDrawTarget; 20 class GrDrawTarget;
20 class GrPaint; 21 class GrPaint;
21 class GrPathProcessor; 22 class GrPathProcessor;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 const SkRect& dst); 267 const SkRect& dst);
267 268
268 /** 269 /**
269 * Draws a batch 270 * Draws a batch
270 * 271 *
271 * @param paint describes how to color pixels. 272 * @param paint describes how to color pixels.
272 * @param batch the batch to draw 273 * @param batch the batch to draw
273 */ 274 */
274 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); 275 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*);
275 276
277 int width() const { return fRenderTarget->width(); }
278 int height() const { return fRenderTarget->height(); }
279 int numColorSamples() const { return fRenderTarget->numColorSamples(); }
280
276 private: 281 private:
277 friend class GrAtlasTextContext; // for access to drawBatch 282 friend class GrAtlasTextContext; // for access to drawBatch
278 friend class GrDrawingManager; // for ctor 283 friend class GrDrawingManager; // for ctor
279 284
280 SkDEBUGCODE(void validate() const;) 285 SkDEBUGCODE(void validate() const;)
281 286
282 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf aceProps); 287 GrDrawContext(GrDrawingManager*, GrRenderTarget*, const SkSurfaceProps* surf aceProps);
283 288
284 void internalDrawPath(GrPipelineBuilder*, 289 void internalDrawPath(GrPipelineBuilder*,
285 const SkMatrix& viewMatrix, 290 const SkMatrix& viewMatrix,
(...skipping 13 matching lines...) Expand all
299 304
300 // 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
301 // 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'.
302 GrDrawTarget* fDrawTarget; 307 GrDrawTarget* fDrawTarget;
303 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana ger 308 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana ger
304 309
305 SkSurfaceProps fSurfaceProps; 310 SkSurfaceProps fSurfaceProps;
306 }; 311 };
307 312
308 #endif 313 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrClip.h ('k') | src/gpu/GrAtlasTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698