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

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

Issue 1196683003: remove SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up Created 5 years, 6 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
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 14
14 class GrBatch; 15 class GrBatch;
15 class GrClip; 16 class GrClip;
16 class GrContext; 17 class GrContext;
17 class GrDrawTarget; 18 class GrDrawTarget;
18 class GrPaint; 19 class GrPaint;
19 class GrPathProcessor; 20 class GrPathProcessor;
20 class GrPathRange; 21 class GrPathRange;
21 class GrPipelineBuilder; 22 class GrPipelineBuilder;
22 class GrRenderTarget; 23 class GrRenderTarget;
23 class GrStrokeInfo; 24 class GrStrokeInfo;
24 class GrSurface; 25 class GrSurface;
25 class GrTextContext; 26 class GrTextContext;
26 struct SkDeviceProperties;
27 class SkDrawFilter; 27 class SkDrawFilter;
28 struct SkIPoint; 28 struct SkIPoint;
29 struct SkIRect; 29 struct SkIRect;
30 class SkMatrix; 30 class SkMatrix;
31 class SkPaint; 31 class SkPaint;
32 class SkPath; 32 class SkPath;
33 struct SkPoint; 33 struct SkPoint;
34 struct SkRect; 34 struct SkRect;
35 class SkRRect; 35 class SkRRect;
36 class SkTextBlob; 36 class SkTextBlob;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 const GrPaint& paint, 237 const GrPaint& paint,
238 const SkMatrix& viewMatrix, 238 const SkMatrix& viewMatrix,
239 const SkRect& oval, 239 const SkRect& oval,
240 const GrStrokeInfo& strokeInfo); 240 const GrStrokeInfo& strokeInfo);
241 241
242 242
243 private: 243 private:
244 friend class GrAtlasTextContext; // for access to drawBatch 244 friend class GrAtlasTextContext; // for access to drawBatch
245 friend class GrContext; // for ctor 245 friend class GrContext; // for ctor
246 246
247 GrDrawContext(GrContext*, GrDrawTarget*, const SkDeviceProperties&); 247 GrDrawContext(GrContext*, GrDrawTarget*, const SkSurfaceProps&);
248 248
249 // Sets the paint. Returns true on success; false on failure. 249 // Sets the paint. Returns true on success; false on failure.
250 bool prepareToDraw(GrPipelineBuilder*, 250 bool prepareToDraw(GrPipelineBuilder*,
251 GrRenderTarget* rt, 251 GrRenderTarget* rt,
252 const GrClip&, 252 const GrClip&,
253 const GrPaint* paint); 253 const GrPaint* paint);
254 GrTextContext* createTextContext(GrRenderTarget*, const SkDeviceProperties&) ; 254 GrTextContext* createTextContext(GrRenderTarget*, const SkSurfaceProps&);
255 255
256 // A simpler version of the above which just returns true on success; false on failure. 256 // A simpler version of the above which just returns true on success; false on failure.
257 // Clip is *NOT* set 257 // Clip is *NOT* set
258 bool prepareToDraw(GrRenderTarget* rt); 258 bool prepareToDraw(GrRenderTarget* rt);
259 259
260 void internalDrawPath(GrDrawTarget*, 260 void internalDrawPath(GrDrawTarget*,
261 GrPipelineBuilder*, 261 GrPipelineBuilder*,
262 const SkMatrix& viewMatrix, 262 const SkMatrix& viewMatrix,
263 GrColor, 263 GrColor,
264 bool useAA, 264 bool useAA,
265 const SkPath&, 265 const SkPath&,
266 const GrStrokeInfo&); 266 const GrStrokeInfo&);
267 267
268 // This entry point allows the GrTextContext-derived classes to add their ba tches to 268 // This entry point allows the GrTextContext-derived classes to add their ba tches to
269 // the drawTarget. 269 // the drawTarget.
270 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch); 270 void drawBatch(GrPipelineBuilder* pipelineBuilder, GrBatch* batch);
271 271
272 GrContext* fContext; // owning context -> no ref 272 GrContext* fContext; // owning context -> no ref
273 GrDrawTarget* fDrawTarget; 273 GrDrawTarget* fDrawTarget;
274 GrTextContext* fTextContext; // lazily created 274 GrTextContext* fTextContext; // lazily created
275 275
276 SkDeviceProperties* fDevProps; // ptr b.c. SkDeviceProperties isn't publi c 276 SkSurfaceProps fSurfaceProps;
277 }; 277 };
278 278
279 #endif 279 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698