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

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

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 | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLPath.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 #include "GrGLGpu.h" 8 #include "GrGLGpu.h"
9 #include "GrGLBuffer.h" 9 #include "GrGLBuffer.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 } else if (GR_GL_TEXTURE_2D != idDesc.fInfo.fTarget) { 642 } else if (GR_GL_TEXTURE_2D != idDesc.fInfo.fTarget) {
643 return nullptr; 643 return nullptr;
644 } 644 }
645 645
646 // Sample count is interpreted to mean the number of samples that Gr code sh ould allocate 646 // Sample count is interpreted to mean the number of samples that Gr code sh ould allocate
647 // for a render buffer that resolves to the texture. We don't support MSAA t extures. 647 // for a render buffer that resolves to the texture. We don't support MSAA t extures.
648 if (desc.fSampleCnt && !renderTarget) { 648 if (desc.fSampleCnt && !renderTarget) {
649 return nullptr; 649 return nullptr;
650 } 650 }
651 651
652 switch (ownership) { 652 if (kAdopt_GrWrapOwnership == ownership) {
653 case kAdopt_GrWrapOwnership: 653 idDesc.fOwnership = GrBackendObjectOwnership::kOwned;
654 idDesc.fLifeCycle = GrGpuResource::kAdopted_LifeCycle; 654 } else {
655 break; 655 idDesc.fOwnership = GrBackendObjectOwnership::kBorrowed;
656 case kBorrow_GrWrapOwnership:
657 idDesc.fLifeCycle = GrGpuResource::kBorrowed_LifeCycle;
658 break;
659 } 656 }
660 657
661 surfDesc.fFlags = (GrSurfaceFlags) desc.fFlags; 658 surfDesc.fFlags = (GrSurfaceFlags) desc.fFlags;
662 surfDesc.fWidth = desc.fWidth; 659 surfDesc.fWidth = desc.fWidth;
663 surfDesc.fHeight = desc.fHeight; 660 surfDesc.fHeight = desc.fHeight;
664 surfDesc.fConfig = desc.fConfig; 661 surfDesc.fConfig = desc.fConfig;
665 surfDesc.fSampleCnt = SkTMin(desc.fSampleCnt, this->caps()->maxSampleCount() ); 662 surfDesc.fSampleCnt = SkTMin(desc.fSampleCnt, this->caps()->maxSampleCount() );
666 // FIXME: this should be calling resolve_origin(), but Chrome code is curre ntly 663 // FIXME: this should be calling resolve_origin(), but Chrome code is curre ntly
667 // assuming the old behaviour, which is that backend textures are always 664 // assuming the old behaviour, which is that backend textures are always
668 // BottomLeft, even for non-RT's. Once Chrome is fixed, change this to: 665 // BottomLeft, even for non-RT's. Once Chrome is fixed, change this to:
669 // glTexDesc.fOrigin = resolve_origin(desc.fOrigin, renderTarget); 666 // glTexDesc.fOrigin = resolve_origin(desc.fOrigin, renderTarget);
670 if (kDefault_GrSurfaceOrigin == desc.fOrigin) { 667 if (kDefault_GrSurfaceOrigin == desc.fOrigin) {
671 surfDesc.fOrigin = kBottomLeft_GrSurfaceOrigin; 668 surfDesc.fOrigin = kBottomLeft_GrSurfaceOrigin;
672 } else { 669 } else {
673 surfDesc.fOrigin = desc.fOrigin; 670 surfDesc.fOrigin = desc.fOrigin;
674 } 671 }
675 672
676 GrGLTexture* texture = nullptr; 673 GrGLTexture* texture = nullptr;
677 if (renderTarget) { 674 if (renderTarget) {
678 GrGLRenderTarget::IDDesc rtIDDesc; 675 GrGLRenderTarget::IDDesc rtIDDesc;
679 if (!this->createRenderTargetObjects(surfDesc, GrGpuResource::kUncached_ LifeCycle, 676 if (!this->createRenderTargetObjects(surfDesc, idDesc.fInfo, &rtIDDesc)) {
680 idDesc.fInfo, &rtIDDesc)) {
681 return nullptr; 677 return nullptr;
682 } 678 }
683 texture = new GrGLTextureRenderTarget(this, surfDesc, idDesc, rtIDDesc); 679 texture = GrGLTextureRenderTarget::CreateWrapped(this, surfDesc, idDesc, rtIDDesc);
684 } else { 680 } else {
685 texture = new GrGLTexture(this, surfDesc, idDesc); 681 texture = GrGLTexture::CreateWrapped(this, surfDesc, idDesc);
686 } 682 }
687 if (nullptr == texture) { 683 if (nullptr == texture) {
688 return nullptr; 684 return nullptr;
689 } 685 }
690 686
691 return texture; 687 return texture;
692 } 688 }
693 689
694 GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe sc& wrapDesc, 690 GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe sc& wrapDesc,
695 GrWrapOwnership ownership) { 691 GrWrapOwnership ownership) {
696 GrGLRenderTarget::IDDesc idDesc; 692 GrGLRenderTarget::IDDesc idDesc;
697 idDesc.fRTFBOID = static_cast<GrGLuint>(wrapDesc.fRenderTargetHandle); 693 idDesc.fRTFBOID = static_cast<GrGLuint>(wrapDesc.fRenderTargetHandle);
698 idDesc.fMSColorRenderbufferID = 0; 694 idDesc.fMSColorRenderbufferID = 0;
699 idDesc.fTexFBOID = GrGLRenderTarget::kUnresolvableFBOID; 695 idDesc.fTexFBOID = GrGLRenderTarget::kUnresolvableFBOID;
700 switch (ownership) { 696 if (kAdopt_GrWrapOwnership == ownership) {
701 case kAdopt_GrWrapOwnership: 697 idDesc.fRTFBOOwnership = GrBackendObjectOwnership::kOwned;
702 idDesc.fLifeCycle = GrGpuResource::kAdopted_LifeCycle; 698 } else {
703 break; 699 idDesc.fRTFBOOwnership = GrBackendObjectOwnership::kBorrowed;
704 case kBorrow_GrWrapOwnership:
705 idDesc.fLifeCycle = GrGpuResource::kBorrowed_LifeCycle;
706 break;
707 } 700 }
708 idDesc.fSampleConfig = GrRenderTarget::kUnified_SampleConfig; 701 idDesc.fSampleConfig = GrRenderTarget::kUnified_SampleConfig;
709 702
710 GrSurfaceDesc desc; 703 GrSurfaceDesc desc;
711 desc.fConfig = wrapDesc.fConfig; 704 desc.fConfig = wrapDesc.fConfig;
712 desc.fFlags = kCheckAllocation_GrSurfaceFlag | kRenderTarget_GrSurfaceFlag; 705 desc.fFlags = kCheckAllocation_GrSurfaceFlag | kRenderTarget_GrSurfaceFlag;
713 desc.fWidth = wrapDesc.fWidth; 706 desc.fWidth = wrapDesc.fWidth;
714 desc.fHeight = wrapDesc.fHeight; 707 desc.fHeight = wrapDesc.fHeight;
715 desc.fSampleCnt = SkTMin(wrapDesc.fSampleCnt, this->caps()->maxSampleCount() ); 708 desc.fSampleCnt = SkTMin(wrapDesc.fSampleCnt, this->caps()->maxSampleCount() );
716 desc.fOrigin = resolve_origin(wrapDesc.fOrigin, true); 709 desc.fOrigin = resolve_origin(wrapDesc.fOrigin, true);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 // assuming the old behaviour, which is that backend textures are always 751 // assuming the old behaviour, which is that backend textures are always
759 // BottomLeft, even for non-RT's. Once Chrome is fixed, change this to: 752 // BottomLeft, even for non-RT's. Once Chrome is fixed, change this to:
760 // glTexDesc.fOrigin = resolve_origin(desc.fOrigin, renderTarget); 753 // glTexDesc.fOrigin = resolve_origin(desc.fOrigin, renderTarget);
761 if (kDefault_GrSurfaceOrigin == desc.fOrigin) { 754 if (kDefault_GrSurfaceOrigin == desc.fOrigin) {
762 surfDesc.fOrigin = kBottomLeft_GrSurfaceOrigin; 755 surfDesc.fOrigin = kBottomLeft_GrSurfaceOrigin;
763 } else { 756 } else {
764 surfDesc.fOrigin = desc.fOrigin; 757 surfDesc.fOrigin = desc.fOrigin;
765 } 758 }
766 759
767 GrGLRenderTarget::IDDesc rtIDDesc; 760 GrGLRenderTarget::IDDesc rtIDDesc;
768 if (!this->createRenderTargetObjects(surfDesc, GrGpuResource::kUncached_Life Cycle, 761 if (!this->createRenderTargetObjects(surfDesc, texInfo, &rtIDDesc)) {
769 texInfo, &rtIDDesc)) {
770 return nullptr; 762 return nullptr;
771 } 763 }
772 return GrGLRenderTarget::CreateWrapped(this, surfDesc, rtIDDesc, 0); 764 return GrGLRenderTarget::CreateWrapped(this, surfDesc, rtIDDesc, 0);
773 } 765 }
774 766
775 //////////////////////////////////////////////////////////////////////////////// 767 ////////////////////////////////////////////////////////////////////////////////
776 768
777 bool GrGLGpu::onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, 769 bool GrGLGpu::onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
778 GrPixelConfig srcConfig, 770 GrPixelConfig srcConfig,
779 DrawPreference* drawPreference, 771 DrawPreference* drawPreference,
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 width, height)); 1472 width, height));
1481 break; 1473 break;
1482 case GrGLCaps::kNone_MSFBOType: 1474 case GrGLCaps::kNone_MSFBOType:
1483 SkFAIL("Shouldn't be here if we don't support multisampled renderbuf fers."); 1475 SkFAIL("Shouldn't be here if we don't support multisampled renderbuf fers.");
1484 break; 1476 break;
1485 } 1477 }
1486 return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); 1478 return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));
1487 } 1479 }
1488 1480
1489 bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc, 1481 bool GrGLGpu::createRenderTargetObjects(const GrSurfaceDesc& desc,
1490 GrGpuResource::LifeCycle lifeCycle,
1491 const GrGLTextureInfo& texInfo, 1482 const GrGLTextureInfo& texInfo,
1492 GrGLRenderTarget::IDDesc* idDesc) { 1483 GrGLRenderTarget::IDDesc* idDesc) {
1493 idDesc->fMSColorRenderbufferID = 0; 1484 idDesc->fMSColorRenderbufferID = 0;
1494 idDesc->fRTFBOID = 0; 1485 idDesc->fRTFBOID = 0;
1486 idDesc->fRTFBOOwnership = GrBackendObjectOwnership::kOwned;
1495 idDesc->fTexFBOID = 0; 1487 idDesc->fTexFBOID = 0;
1496 idDesc->fLifeCycle = lifeCycle;
1497 idDesc->fSampleConfig = (GrGLCaps::kMixedSamples_MSFBOType == this->glCaps() .msFBOType() && 1488 idDesc->fSampleConfig = (GrGLCaps::kMixedSamples_MSFBOType == this->glCaps() .msFBOType() &&
1498 desc.fSampleCnt > 0) ? GrRenderTarget::kStencil_Samp leConfig : 1489 desc.fSampleCnt > 0) ? GrRenderTarget::kStencil_Samp leConfig :
1499 GrRenderTarget::kUnified_Samp leConfig; 1490 GrRenderTarget::kUnified_Samp leConfig;
1500 1491
1501 GrGLenum status; 1492 GrGLenum status;
1502 1493
1503 GrGLenum colorRenderbufferFormat = 0; // suppress warning 1494 GrGLenum colorRenderbufferFormat = 0; // suppress warning
1504 1495
1505 if (desc.fSampleCnt > 0 && GrGLCaps::kNone_MSFBOType == this->glCaps().msFBO Type()) { 1496 if (desc.fSampleCnt > 0 && GrGLCaps::kNone_MSFBOType == this->glCaps().msFBO Type()) {
1506 goto FAILED; 1497 goto FAILED;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 // SkDEBUGFAIL("null texture"); 1589 // SkDEBUGFAIL("null texture");
1599 return nullptr; 1590 return nullptr;
1600 } 1591 }
1601 1592
1602 #if 0 && defined(SK_DEBUG) 1593 #if 0 && defined(SK_DEBUG)
1603 static size_t as_size_t(int x) { 1594 static size_t as_size_t(int x) {
1604 return x; 1595 return x;
1605 } 1596 }
1606 #endif 1597 #endif
1607 1598
1608 static GrGLTexture::IDDesc generate_gl_texture(const GrGLInterface* interface, 1599 static GrGLTexture::IDDesc generate_gl_texture(const GrGLInterface* interface) {
1609 GrGpuResource::LifeCycle lifeCycl e) {
1610 GrGLTexture::IDDesc idDesc; 1600 GrGLTexture::IDDesc idDesc;
1611 idDesc.fInfo.fID = 0; 1601 idDesc.fInfo.fID = 0;
1612 GR_GL_CALL(interface, GenTextures(1, &idDesc.fInfo.fID)); 1602 GR_GL_CALL(interface, GenTextures(1, &idDesc.fInfo.fID));
1613 idDesc.fLifeCycle = lifeCycle; 1603 idDesc.fOwnership = GrBackendObjectOwnership::kOwned;
1614 // When we create the texture, we only 1604 // When we create the texture, we only
1615 // create GL_TEXTURE_2D at the moment. 1605 // create GL_TEXTURE_2D at the moment.
1616 // External clients can do something different. 1606 // External clients can do something different.
1617 idDesc.fInfo.fTarget = GR_GL_TEXTURE_2D; 1607 idDesc.fInfo.fTarget = GR_GL_TEXTURE_2D;
1618 return idDesc; 1608 return idDesc;
1619 } 1609 }
1620 1610
1621 static void set_initial_texture_params(const GrGLInterface* interface, 1611 static void set_initial_texture_params(const GrGLInterface* interface,
1622 const GrGLTextureInfo& info, 1612 const GrGLTextureInfo& info,
1623 GrGLTexture::TexParams* initialTexParams) { 1613 GrGLTexture::TexParams* initialTexParams) {
(...skipping 14 matching lines...) Expand all
1638 initialTexParams->fMinFilter)); 1628 initialTexParams->fMinFilter));
1639 GR_GL_CALL(interface, TexParameteri(info.fTarget, 1629 GR_GL_CALL(interface, TexParameteri(info.fTarget,
1640 GR_GL_TEXTURE_WRAP_S, 1630 GR_GL_TEXTURE_WRAP_S,
1641 initialTexParams->fWrapS)); 1631 initialTexParams->fWrapS));
1642 GR_GL_CALL(interface, TexParameteri(info.fTarget, 1632 GR_GL_CALL(interface, TexParameteri(info.fTarget,
1643 GR_GL_TEXTURE_WRAP_T, 1633 GR_GL_TEXTURE_WRAP_T,
1644 initialTexParams->fWrapT)); 1634 initialTexParams->fWrapT));
1645 } 1635 }
1646 1636
1647 GrTexture* GrGLGpu::onCreateTexture(const GrSurfaceDesc& desc, 1637 GrTexture* GrGLGpu::onCreateTexture(const GrSurfaceDesc& desc,
1648 GrGpuResource::LifeCycle lifeCycle, 1638 SkBudgeted budgeted,
1649 const SkTArray<GrMipLevel>& texels) { 1639 const SkTArray<GrMipLevel>& texels) {
1650 // We fail if the MSAA was requested and is not available. 1640 // We fail if the MSAA was requested and is not available.
1651 if (GrGLCaps::kNone_MSFBOType == this->glCaps().msFBOType() && desc.fSampleC nt) { 1641 if (GrGLCaps::kNone_MSFBOType == this->glCaps().msFBOType() && desc.fSampleC nt) {
1652 //SkDebugf("MSAA RT requested but not supported on this platform."); 1642 //SkDebugf("MSAA RT requested but not supported on this platform.");
1653 return return_null_texture(); 1643 return return_null_texture();
1654 } 1644 }
1655 1645
1656 bool renderTarget = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); 1646 bool renderTarget = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag);
1657 1647
1658 GrGLTexture::IDDesc idDesc; 1648 GrGLTexture::IDDesc idDesc;
1659 idDesc.fLifeCycle = lifeCycle; 1649 idDesc.fOwnership = GrBackendObjectOwnership::kOwned;
1660 GrGLTexture::TexParams initialTexParams; 1650 GrGLTexture::TexParams initialTexParams;
1661 if (!this->createTextureImpl(desc, &idDesc.fInfo, renderTarget, &initialTexP arams, texels)) { 1651 if (!this->createTextureImpl(desc, &idDesc.fInfo, renderTarget, &initialTexP arams, texels)) {
1662 return return_null_texture(); 1652 return return_null_texture();
1663 } 1653 }
1664 1654
1665 GrGLTexture* tex; 1655 GrGLTexture* tex;
1666 if (renderTarget) { 1656 if (renderTarget) {
1667 // unbind the texture from the texture unit before binding it to the fra me buffer 1657 // unbind the texture from the texture unit before binding it to the fra me buffer
1668 GL_CALL(BindTexture(idDesc.fInfo.fTarget, 0)); 1658 GL_CALL(BindTexture(idDesc.fInfo.fTarget, 0));
1669 GrGLRenderTarget::IDDesc rtIDDesc; 1659 GrGLRenderTarget::IDDesc rtIDDesc;
1670 1660
1671 if (!this->createRenderTargetObjects(desc, lifeCycle, idDesc.fInfo, &rtI DDesc)) { 1661 if (!this->createRenderTargetObjects(desc, idDesc.fInfo, &rtIDDesc)) {
1672 GL_CALL(DeleteTextures(1, &idDesc.fInfo.fID)); 1662 GL_CALL(DeleteTextures(1, &idDesc.fInfo.fID));
1673 return return_null_texture(); 1663 return return_null_texture();
1674 } 1664 }
1675 tex = new GrGLTextureRenderTarget(this, desc, idDesc, rtIDDesc); 1665 tex = new GrGLTextureRenderTarget(this, budgeted, desc, idDesc, rtIDDesc );
1676 } else { 1666 } else {
1677 bool wasMipMapDataProvided = false; 1667 bool wasMipMapDataProvided = false;
1678 if (texels.count() > 1) { 1668 if (texels.count() > 1) {
1679 wasMipMapDataProvided = true; 1669 wasMipMapDataProvided = true;
1680 } 1670 }
1681 tex = new GrGLTexture(this, desc, idDesc, wasMipMapDataProvided); 1671 tex = new GrGLTexture(this, budgeted, desc, idDesc, wasMipMapDataProvide d);
1682 } 1672 }
1683 tex->setCachedTexParams(initialTexParams, this->getResetTimestamp()); 1673 tex->setCachedTexParams(initialTexParams, this->getResetTimestamp());
1684 #ifdef TRACE_TEXTURE_CREATION 1674 #ifdef TRACE_TEXTURE_CREATION
1685 SkDebugf("--- new texture [%d] size=(%d %d) config=%d\n", 1675 SkDebugf("--- new texture [%d] size=(%d %d) config=%d\n",
1686 glTexDesc.fInfo.fID, desc.fWidth, desc.fHeight, desc.fConfig); 1676 glTexDesc.fInfo.fID, desc.fWidth, desc.fHeight, desc.fConfig);
1687 #endif 1677 #endif
1688 return tex; 1678 return tex;
1689 } 1679 }
1690 1680
1691 GrTexture* GrGLGpu::onCreateCompressedTexture(const GrSurfaceDesc& desc, 1681 GrTexture* GrGLGpu::onCreateCompressedTexture(const GrSurfaceDesc& desc,
1692 GrGpuResource::LifeCycle lifeCycle , 1682 SkBudgeted budgeted,
1693 const SkTArray<GrMipLevel>& texels ) { 1683 const SkTArray<GrMipLevel>& texels ) {
1694 // Make sure that we're not flipping Y. 1684 // Make sure that we're not flipping Y.
1695 if (kBottomLeft_GrSurfaceOrigin == desc.fOrigin) { 1685 if (kBottomLeft_GrSurfaceOrigin == desc.fOrigin) {
1696 return return_null_texture(); 1686 return return_null_texture();
1697 } 1687 }
1698 1688
1699 GrGLTexture::IDDesc idDesc = generate_gl_texture(this->glInterface(), lifeCy cle); 1689 GrGLTexture::IDDesc idDesc = generate_gl_texture(this->glInterface());
1700 if (!idDesc.fInfo.fID) { 1690 if (!idDesc.fInfo.fID) {
1701 return return_null_texture(); 1691 return return_null_texture();
1702 } 1692 }
1703 1693
1704 this->setScratchTextureUnit(); 1694 this->setScratchTextureUnit();
1705 GL_CALL(BindTexture(idDesc.fInfo.fTarget, idDesc.fInfo.fID)); 1695 GL_CALL(BindTexture(idDesc.fInfo.fTarget, idDesc.fInfo.fID));
1706 1696
1707 GrGLTexture::TexParams initialTexParams; 1697 GrGLTexture::TexParams initialTexParams;
1708 set_initial_texture_params(this->glInterface(), idDesc.fInfo, &initialTexPar ams); 1698 set_initial_texture_params(this->glInterface(), idDesc.fInfo, &initialTexPar ams);
1709 1699
1710 if (!this->uploadCompressedTexData(desc, idDesc.fInfo.fTarget, texels)) { 1700 if (!this->uploadCompressedTexData(desc, idDesc.fInfo.fTarget, texels)) {
1711 GL_CALL(DeleteTextures(1, &idDesc.fInfo.fID)); 1701 GL_CALL(DeleteTextures(1, &idDesc.fInfo.fID));
1712 return return_null_texture(); 1702 return return_null_texture();
1713 } 1703 }
1714 1704
1715 GrGLTexture* tex; 1705 GrGLTexture* tex;
1716 tex = new GrGLTexture(this, desc, idDesc); 1706 tex = new GrGLTexture(this, budgeted, desc, idDesc);
1717 tex->setCachedTexParams(initialTexParams, this->getResetTimestamp()); 1707 tex->setCachedTexParams(initialTexParams, this->getResetTimestamp());
1718 #ifdef TRACE_TEXTURE_CREATION 1708 #ifdef TRACE_TEXTURE_CREATION
1719 SkDebugf("--- new compressed texture [%d] size=(%d %d) config=%d\n", 1709 SkDebugf("--- new compressed texture [%d] size=(%d %d) config=%d\n",
1720 glTexDesc.fInfo.fID, desc.fWidth, desc.fHeight, desc.fConfig); 1710 glTexDesc.fInfo.fID, desc.fWidth, desc.fHeight, desc.fConfig);
1721 #endif 1711 #endif
1722 return tex; 1712 return tex;
1723 } 1713 }
1724 1714
1725 namespace { 1715 namespace {
1726 1716
(...skipping 2552 matching lines...) Expand 10 before | Expand all | Expand 10 after
4279 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4269 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4280 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4270 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4281 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4271 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4282 copyParams->fWidth = texture->width(); 4272 copyParams->fWidth = texture->width();
4283 copyParams->fHeight = texture->height(); 4273 copyParams->fHeight = texture->height();
4284 return true; 4274 return true;
4285 } 4275 }
4286 } 4276 }
4287 return false; 4277 return false;
4288 } 4278 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698