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

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

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Fix build error related to isMultisamped renaming Created 5 years, 6 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/GrDrawContext.cpp ('k') | src/gpu/GrOvalRenderer.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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 int width = rt->width(); 140 int width = rt->width();
141 int height = rt->height(); 141 int height = rt->height();
142 #if 0 142 #if 0
143 if (this->caps()->oversizedStencilSupport()) { 143 if (this->caps()->oversizedStencilSupport()) {
144 width = SkNextPow2(width); 144 width = SkNextPow2(width);
145 height = SkNextPow2(height); 145 height = SkNextPow2(height);
146 } 146 }
147 #endif 147 #endif
148 148
149 GrStencilAttachment::ComputeSharedStencilAttachmentKey(width, height, rt->nu mSamples(), &sbKey); 149 GrStencilAttachment::ComputeSharedStencilAttachmentKey(width, height,
150 rt->numStencilSamples(), &sbKey);
150 SkAutoTUnref<GrStencilAttachment> sb(static_cast<GrStencilAttachment*>( 151 SkAutoTUnref<GrStencilAttachment> sb(static_cast<GrStencilAttachment*>(
151 this->getContext()->getResourceCache()->findAndRefUniqueResource(sbKey)) ); 152 this->getContext()->getResourceCache()->findAndRefUniqueResource(sbKey)) );
152 if (sb) { 153 if (sb) {
153 if (this->attachStencilAttachmentToRenderTarget(sb, rt)) { 154 if (this->attachStencilAttachmentToRenderTarget(sb, rt)) {
154 rt->renderTargetPriv().didAttachStencilAttachment(sb); 155 rt->renderTargetPriv().didAttachStencilAttachment(sb);
155 return true; 156 return true;
156 } 157 }
157 return false; 158 return false;
158 } 159 }
159 if (this->createStencilAttachmentForRenderTarget(rt, width, height)) { 160 if (this->createStencilAttachmentForRenderTarget(rt, width, height)) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 //////////////////////////////////////////////////////////////////////////////// 295 ////////////////////////////////////////////////////////////////////////////////
295 296
296 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) { 297 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) {
297 this->handleDirtyContext(); 298 this->handleDirtyContext();
298 GrVertices::Iterator iter; 299 GrVertices::Iterator iter;
299 const GrNonInstancedVertices* verts = iter.init(vertices); 300 const GrNonInstancedVertices* verts = iter.init(vertices);
300 do { 301 do {
301 this->onDraw(args, *verts); 302 this->onDraw(args, *verts);
302 } while ((verts = iter.next())); 303 } while ((verts = iter.next()));
303 } 304 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698