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

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

Issue 1988923002: Remove GrRenderTarget from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 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
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | src/gpu/GrDrawContext.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
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 * Draws a batch 254 * Draws a batch
255 * 255 *
256 * @param paint describes how to color pixels. 256 * @param paint describes how to color pixels.
257 * @param batch the batch to draw 257 * @param batch the batch to draw
258 */ 258 */
259 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*); 259 void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*);
260 260
261 bool isStencilBufferMultisampled() const { 261 bool isStencilBufferMultisampled() const {
262 return fRenderTarget->isStencilBufferMultisampled(); 262 return fRenderTarget->isStencilBufferMultisampled();
263 } 263 }
264 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam pled(); }
264 bool hasMixedSamples() const { return fRenderTarget->hasMixedSamples(); } 265 bool hasMixedSamples() const { return fRenderTarget->hasMixedSamples(); }
265 266
266 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); } 267 const GrSurfaceDesc& desc() const { return fRenderTarget->desc(); }
267 int width() const { return fRenderTarget->width(); } 268 int width() const { return fRenderTarget->width(); }
268 int height() const { return fRenderTarget->height(); } 269 int height() const { return fRenderTarget->height(); }
269 GrPixelConfig config() const { return fRenderTarget->config(); } 270 GrPixelConfig config() const { return fRenderTarget->config(); }
270 bool isUnifiedMultisampled() const { return fRenderTarget->isUnifiedMultisam pled(); }
271 int numColorSamples() const { return fRenderTarget->numColorSamples(); } 271 int numColorSamples() const { return fRenderTarget->numColorSamples(); }
272 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); } 272 bool isGammaCorrect() const { return fSurfaceProps.isGammaCorrect(); }
273 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; } 273 const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; }
274 274
275 bool wasAbandoned() const; 275 bool wasAbandoned() const;
276 276
277 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); } 277 GrRenderTarget* accessRenderTarget() { return fRenderTarget.get(); }
278 278
279 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; } 279 sk_sp<GrRenderTarget> renderTarget() { return fRenderTarget; }
280 280
(...skipping 10 matching lines...) Expand all
291 const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwn er*); 291 const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwn er*);
292 292
293 GrDrawingManager* drawingManager() { return fDrawingManager; } 293 GrDrawingManager* drawingManager() { return fDrawingManager; }
294 294
295 SkDEBUGCODE(GrSingleOwner* singleOwner() { return fSingleOwner; }) 295 SkDEBUGCODE(GrSingleOwner* singleOwner() { return fSingleOwner; })
296 SkDEBUGCODE(void validate() const;) 296 SkDEBUGCODE(void validate() const;)
297 297
298 private: 298 private:
299 friend class GrAtlasTextBlob; // for access to drawBatch 299 friend class GrAtlasTextBlob; // for access to drawBatch
300 friend class GrStencilAndCoverTextContext; // for access to drawBatch 300 friend class GrStencilAndCoverTextContext; // for access to drawBatch
301
301 friend class GrDrawingManager; // for ctor 302 friend class GrDrawingManager; // for ctor
302 friend class GrDrawContextPriv; 303 friend class GrDrawContextPriv;
303 friend class GrTestTarget; // for access to getDrawTarget 304 friend class GrTestTarget; // for access to getDrawTarget
304 friend class GrSWMaskHelper; // for access to drawBatch 305 friend class GrSWMaskHelper; // for access to drawBatch
305 friend class GrClipMaskManager; // for access to drawBatch 306 friend class GrClipMaskManager; // for access to drawBatch
306 307
307 // All the path renderers currently make their own batches 308 // All the path renderers currently make their own batches
308 friend class GrSoftwarePathRenderer; // for access to drawBatch 309 friend class GrSoftwarePathRenderer; // for access to drawBatch
309 friend class GrAAConvexPathRenderer; // for access to drawBatch 310 friend class GrAAConvexPathRenderer; // for access to drawBatch
310 friend class GrDashLinePathRenderer; // for access to drawBatch 311 friend class GrDashLinePathRenderer; // for access to drawBatch
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 GrContext* fContext; 350 GrContext* fContext;
350 351
351 SkSurfaceProps fSurfaceProps; 352 SkSurfaceProps fSurfaceProps;
352 GrAuditTrail* fAuditTrail; 353 GrAuditTrail* fAuditTrail;
353 354
354 // In debug builds we guard against improper thread handling 355 // In debug builds we guard against improper thread handling
355 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) 356 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
356 }; 357 };
357 358
358 #endif 359 #endif
OLDNEW
« no previous file with comments | « gm/yuvtorgbeffect.cpp ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698