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

Side by Side Diff: src/gpu/GrGpu.h

Issue 1862043002: Refactor to separate backend object lifecycle and GpuResource budget decision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unrelated GrBuffer::onGpuMemorySize() lack of override keyword compile error Created 4 years, 8 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 | « include/gpu/GrTypesPriv.h ('k') | src/gpu/GrGpu.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 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // assumed 3D context state and dirty any state cache. 522 // assumed 3D context state and dirty any state cache.
523 virtual void onResetContext(uint32_t resetBits) = 0; 523 virtual void onResetContext(uint32_t resetBits) = 0;
524 524
525 // Called before certain draws in order to guarantee coherent results from d st reads. 525 // Called before certain draws in order to guarantee coherent results from d st reads.
526 virtual void xferBarrier(GrRenderTarget*, GrXferBarrierType) = 0; 526 virtual void xferBarrier(GrRenderTarget*, GrXferBarrierType) = 0;
527 527
528 // overridden by backend-specific derived class to create objects. 528 // overridden by backend-specific derived class to create objects.
529 // Texture size and sample size will have already been validated in base cla ss before 529 // Texture size and sample size will have already been validated in base cla ss before
530 // onCreateTexture/CompressedTexture are called. 530 // onCreateTexture/CompressedTexture are called.
531 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc, 531 virtual GrTexture* onCreateTexture(const GrSurfaceDesc& desc,
532 GrGpuResource::LifeCycle lifeCycle, 532 SkBudgeted budgeted,
533 const SkTArray<GrMipLevel>& texels) = 0; 533 const SkTArray<GrMipLevel>& texels) = 0;
534 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, 534 virtual GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc,
535 GrGpuResource::LifeCycle lifeCy cle, 535 SkBudgeted budgeted,
536 const SkTArray<GrMipLevel>& tex els) = 0; 536 const SkTArray<GrMipLevel>& tex els) = 0;
537 537
538 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO wnership) = 0; 538 virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapO wnership) = 0;
539 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&, 539 virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTarge tDesc&,
540 GrWrapOwnership) = 0; 540 GrWrapOwnership) = 0;
541 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe xtureDesc&) = 0; 541 virtual GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTe xtureDesc&) = 0;
542 virtual GrBuffer* onCreateBuffer(size_t size, GrBufferType intendedType, GrA ccessPattern, 542 virtual GrBuffer* onCreateBuffer(size_t size, GrBufferType intendedType, GrA ccessPattern,
543 const void* data) = 0; 543 const void* data) = 0;
544 544
545 // overridden by backend-specific derived class to perform the clear. 545 // overridden by backend-specific derived class to perform the clear.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 SkTArray<const MultisampleSpecs*, true> fMultisa mpleSpecsMap; 611 SkTArray<const MultisampleSpecs*, true> fMultisa mpleSpecsMap;
612 GrTAllocator<MultisampleSpecs> fMultisa mpleSpecsAllocator; 612 GrTAllocator<MultisampleSpecs> fMultisa mpleSpecsAllocator;
613 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. 613 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu.
614 GrContext* fContext ; 614 GrContext* fContext ;
615 615
616 friend class GrPathRendering; 616 friend class GrPathRendering;
617 typedef SkRefCnt INHERITED; 617 typedef SkRefCnt INHERITED;
618 }; 618 };
619 619
620 #endif 620 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTypesPriv.h ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698