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

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

Issue 1137663004: Don't issue texture barriers for RT's with separate storage (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_oreq
Patch Set: rebase Created 5 years, 7 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') | no next file » | 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 8
9 #include "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLStencilAttachment.h" 10 #include "GrGLStencilAttachment.h"
(...skipping 2769 matching lines...) Expand 10 before | Expand all | Expand 10 after
2780 if(!SkIRect::IntersectsNoEmptyCheck(dstRect, srcRect)) { 2780 if(!SkIRect::IntersectsNoEmptyCheck(dstRect, srcRect)) {
2781 return true; 2781 return true;
2782 } 2782 }
2783 } else { 2783 } else {
2784 return true; 2784 return true;
2785 } 2785 }
2786 } 2786 }
2787 return false; 2787 return false;
2788 } 2788 }
2789 2789
2790 void GrGLGpu::xferBarrier(GrXferBarrierType type) { 2790 void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) {
2791 switch (type) { 2791 switch (type) {
2792 case kTexture_GrXferBarrierType: 2792 case kTexture_GrXferBarrierType: {
2793 GrGLRenderTarget* glrt = static_cast<GrGLRenderTarget*>(rt);
2794 if (glrt->textureFBOID() != glrt->renderFBOID()) {
2795 // The render target uses separate storage so no need for glText ureBarrier.
2796 // FIXME: The render target will resolve automatically when its texture is bound,
2797 // but we could resolve only the bounds that will be read if we do it here instead.
2798 return;
2799 }
2793 SkASSERT(this->caps()->textureBarrierSupport()); 2800 SkASSERT(this->caps()->textureBarrierSupport());
2794 GL_CALL(TextureBarrier()); 2801 GL_CALL(TextureBarrier());
2795 return; 2802 return;
2803 }
2796 case kBlend_GrXferBarrierType: 2804 case kBlend_GrXferBarrierType:
2797 SkASSERT(GrDrawTargetCaps::kAdvanced_BlendEquationSupport == 2805 SkASSERT(GrDrawTargetCaps::kAdvanced_BlendEquationSupport ==
2798 this->caps()->blendEquationSupport()); 2806 this->caps()->blendEquationSupport());
2799 GL_CALL(BlendBarrier()); 2807 GL_CALL(BlendBarrier());
2800 return; 2808 return;
2801 } 2809 }
2802 } 2810 }
2803 2811
2804 void GrGLGpu::didAddGpuTraceMarker() { 2812 void GrGLGpu::didAddGpuTraceMarker() {
2805 if (this->caps()->gpuTracingSupport()) { 2813 if (this->caps()->gpuTracingSupport()) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 this->setVertexArrayID(gpu, 0); 2856 this->setVertexArrayID(gpu, 0);
2849 } 2857 }
2850 int attrCount = gpu->glCaps().maxVertexAttributes(); 2858 int attrCount = gpu->glCaps().maxVertexAttributes();
2851 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2859 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2852 fDefaultVertexArrayAttribState.resize(attrCount); 2860 fDefaultVertexArrayAttribState.resize(attrCount);
2853 } 2861 }
2854 attribState = &fDefaultVertexArrayAttribState; 2862 attribState = &fDefaultVertexArrayAttribState;
2855 } 2863 }
2856 return attribState; 2864 return attribState;
2857 } 2865 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698