| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|