| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 SkAutoTDelete<GrPathRendering> fPathRendering; | 430 SkAutoTDelete<GrPathRendering> fPathRendering; |
| 431 // Subclass must initialize this in its constructor. | 431 // Subclass must initialize this in its constructor. |
| 432 SkAutoTUnref<const GrDrawTargetCaps> fCaps; | 432 SkAutoTUnref<const GrDrawTargetCaps> fCaps; |
| 433 | 433 |
| 434 private: | 434 private: |
| 435 // called when the 3D context state is unknown. Subclass should emit any | 435 // called when the 3D context state is unknown. Subclass should emit any |
| 436 // assumed 3D context state and dirty any state cache. | 436 // assumed 3D context state and dirty any state cache. |
| 437 virtual void onResetContext(uint32_t resetBits) = 0; | 437 virtual void onResetContext(uint32_t resetBits) = 0; |
| 438 | 438 |
| 439 // overridden by backend-specific derived class to create objects. | 439 // overridden by backend-specific derived class to create objects. |
| 440 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, bool budgeted, | 440 // Texture size and sample size will have already been validated in base cla
ss before |
| 441 // onCreateTexture/CompressedTexture are called. |
| 442 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, |
| 443 GrGpuResource::LifeCycle lifeCycle, |
| 441 const void* srcData, size_t rowBytes) = 0
; | 444 const void* srcData, size_t rowBytes) = 0
; |
| 442 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, bool
budgeted, | 445 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, |
| 446 GrGpuResource::LifeCycle lifeCy
cle, |
| 443 const void* srcData) = 0; | 447 const void* srcData) = 0; |
| 444 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) = 0; | 448 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) = 0; |
| 445 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&) = 0; | 449 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge
tDesc&) = 0; |
| 446 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0; | 450 virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0; |
| 447 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) = 0; | 451 virtual GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) = 0; |
| 448 | 452 |
| 449 // overridden by backend-specific derived class to perform the clear. | 453 // overridden by backend-specific derived class to perform the clear. |
| 450 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, | 454 virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, |
| 451 bool canIgnoreRect) = 0; | 455 bool canIgnoreRect) = 0; |
| 452 | 456 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 int fGpuTrac
eMarkerCount; | 523 int fGpuTrac
eMarkerCount; |
| 520 GrTraceMarkerSet fActiveT
raceMarkers; | 524 GrTraceMarkerSet fActiveT
raceMarkers; |
| 521 GrTraceMarkerSet fStoredT
raceMarkers; | 525 GrTraceMarkerSet fStoredT
raceMarkers; |
| 522 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 526 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
| 523 GrContext* fContext
; | 527 GrContext* fContext
; |
| 524 | 528 |
| 525 typedef SkRefCnt INHERITED; | 529 typedef SkRefCnt INHERITED; |
| 526 }; | 530 }; |
| 527 | 531 |
| 528 #endif | 532 #endif |
| OLD | NEW |