| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2011 Google Inc. | 2  * Copyright 2011 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 GrGpu_DEFINED | 8 #ifndef GrGpu_DEFINED | 
| 9 #define GrGpu_DEFINED | 9 #define GrGpu_DEFINED | 
| 10 | 10 | 
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 242      * @param buffer        memory to read pixels from | 242      * @param buffer        memory to read pixels from | 
| 243      * @param rowBytes      number of bytes between consecutive rows. Zero | 243      * @param rowBytes      number of bytes between consecutive rows. Zero | 
| 244      *                      means rows are tightly packed. | 244      *                      means rows are tightly packed. | 
| 245      */ | 245      */ | 
| 246     bool writePixels(GrSurface* surface, | 246     bool writePixels(GrSurface* surface, | 
| 247                      int left, int top, int width, int height, | 247                      int left, int top, int width, int height, | 
| 248                      GrPixelConfig config, const void* buffer, | 248                      GrPixelConfig config, const void* buffer, | 
| 249                      size_t rowBytes); | 249                      size_t rowBytes); | 
| 250 | 250 | 
| 251     /** | 251     /** | 
| 252      * Clear the passed in render target. Ignores the draw state and clip. Clear
     s the whole thing if | 252      * Clear the passed in render target. Ignores the draw state and clip. | 
| 253      * rect is NULL, otherwise just the rect. If canIgnoreRect is set then the e
     ntire render target |  | 
| 254      * can be optionally cleared. |  | 
| 255      */ | 253      */ | 
| 256     void clear(const SkIRect* rect, GrColor color, bool canIgnoreRect,GrRenderTa
     rget* renderTarget); | 254     void clear(const SkIRect& rect, GrColor color, GrRenderTarget* renderTarget)
     ; | 
| 257 | 255 | 
| 258 | 256 | 
| 259     void clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* 
     renderTarget); | 257     void clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* 
     renderTarget); | 
| 260 | 258 | 
| 261     /** | 259     /** | 
| 262      * Discards the contents render target. NULL indicates that the current rend
     er target should | 260      * Discards the contents render target. NULL indicates that the current rend
     er target should | 
| 263      * be discarded. | 261      * be discarded. | 
| 264      **/ | 262      **/ | 
| 265     virtual void discard(GrRenderTarget* = NULL) = 0; | 263     virtual void discard(GrRenderTarget* = NULL) = 0; | 
| 266 | 264 | 
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 443     virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, | 441     virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, | 
| 444                                                  GrGpuResource::LifeCycle lifeCy
     cle, | 442                                                  GrGpuResource::LifeCycle lifeCy
     cle, | 
| 445                                                  const void* srcData) = 0; | 443                                                  const void* srcData) = 0; | 
| 446     virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
     wnership) = 0; | 444     virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO
     wnership) = 0; | 
| 447     virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
     tDesc&, | 445     virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
     tDesc&, | 
| 448                                                       GrWrapOwnership) = 0; | 446                                                       GrWrapOwnership) = 0; | 
| 449     virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0; | 447     virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0; | 
| 450     virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) = 0; | 448     virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) = 0; | 
| 451 | 449 | 
| 452     // overridden by backend-specific derived class to perform the clear. | 450     // overridden by backend-specific derived class to perform the clear. | 
| 453     virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, | 451     virtual void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) = 
     0; | 
| 454                          bool canIgnoreRect) = 0; |  | 
| 455 | 452 | 
| 456 | 453 | 
| 457     // Overridden by backend specific classes to perform a clear of the stencil 
     clip bits.  This is | 454     // Overridden by backend specific classes to perform a clear of the stencil 
     clip bits.  This is | 
| 458     // ONLY used by the the clip target | 455     // ONLY used by the the clip target | 
| 459     virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool i
     nsideClip) = 0; | 456     virtual void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool i
     nsideClip) = 0; | 
| 460 | 457 | 
| 461     // overridden by backend-specific derived class to perform the draw call. | 458     // overridden by backend-specific derived class to perform the draw call. | 
| 462     virtual void onDraw(const DrawArgs&, const GrNonInstancedVertices&) = 0; | 459     virtual void onDraw(const DrawArgs&, const GrNonInstancedVertices&) = 0; | 
| 463 | 460 | 
| 464     virtual bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int r
     eadHeight, | 461     virtual bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int r
     eadHeight, | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 518     GrTraceMarkerSet                                                    fActiveT
     raceMarkers; | 515     GrTraceMarkerSet                                                    fActiveT
     raceMarkers; | 
| 519     GrTraceMarkerSet                                                    fStoredT
     raceMarkers; | 516     GrTraceMarkerSet                                                    fStoredT
     raceMarkers; | 
| 520     // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 517     // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 
| 521     GrContext*                                                          fContext
     ; | 518     GrContext*                                                          fContext
     ; | 
| 522 | 519 | 
| 523     friend class GrPathRendering; | 520     friend class GrPathRendering; | 
| 524     typedef SkRefCnt INHERITED; | 521     typedef SkRefCnt INHERITED; | 
| 525 }; | 522 }; | 
| 526 | 523 | 
| 527 #endif | 524 #endif | 
| OLD | NEW | 
|---|