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

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

Issue 1015223002: Remove recent changes to use temp fbo to do stencil clears. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 9 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 | « no previous file | src/gpu/gl/GrGLGpu.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 SkAutoTUnref<GrStencilBuffer> sb(static_cast<GrStencilBuffer*>( 91 SkAutoTUnref<GrStencilBuffer> sb(static_cast<GrStencilBuffer*>(
92 this->getContext()->getResourceCache()->findAndRefUniqueResource(sbKey)) ); 92 this->getContext()->getResourceCache()->findAndRefUniqueResource(sbKey)) );
93 if (sb) { 93 if (sb) {
94 if (this->attachStencilBufferToRenderTarget(sb, rt)) { 94 if (this->attachStencilBufferToRenderTarget(sb, rt)) {
95 rt->renderTargetPriv().didAttachStencilBuffer(sb); 95 rt->renderTargetPriv().didAttachStencilBuffer(sb);
96 return true; 96 return true;
97 } 97 }
98 return false; 98 return false;
99 } 99 }
100 if (this->createStencilBufferForRenderTarget(rt, width, height)) { 100 if (this->createStencilBufferForRenderTarget(rt, width, height)) {
101 // Right now we're clearing the stencil buffer here after it is
102 // attached to an RT for the first time. When we start matching
103 // stencil buffers with smaller color targets this will no longer
104 // be correct because it won't be guaranteed to clear the entire
105 // sb.
106 // We used to clear down in the GL subclass using a special purpose
107 // FBO. But iOS doesn't allow a stencil-only FBO. It reports unsupported
108 // FBO status.
109 this->clearStencil(rt);
101 GrStencilBuffer* sb = rt->renderTargetPriv().getStencilBuffer(); 110 GrStencilBuffer* sb = rt->renderTargetPriv().getStencilBuffer();
102 sb->resourcePriv().setUniqueKey(sbKey); 111 sb->resourcePriv().setUniqueKey(sbKey);
103 return true; 112 return true;
104 } else { 113 } else {
105 return false; 114 return false;
106 } 115 }
107 } 116 }
108 117
109 GrTexture* GrGpu::wrapBackendTexture(const GrBackendTextureDesc& desc) { 118 GrTexture* GrGpu::wrapBackendTexture(const GrBackendTextureDesc& desc) {
110 this->handleDirtyContext(); 119 this->handleDirtyContext();
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 GrDrawTarget::PathIndexType indexType, 313 GrDrawTarget::PathIndexType indexType,
305 const float transformValues[], 314 const float transformValues[],
306 GrDrawTarget::PathTransformType transformType, 315 GrDrawTarget::PathTransformType transformType,
307 int count, 316 int count,
308 const GrStencilSettings& stencilSettings) { 317 const GrStencilSettings& stencilSettings) {
309 this->handleDirtyContext(); 318 this->handleDirtyContext();
310 pathRange->willDrawPaths(indices, indexType, count); 319 pathRange->willDrawPaths(indices, indexType, count);
311 this->onDrawPaths(args, pathRange, indices, indexType, transformValues, 320 this->onDrawPaths(args, pathRange, indices, indexType, transformValues,
312 transformType, count, stencilSettings); 321 transformType, count, stencilSettings);
313 } 322 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698