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

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

Issue 18461007: Fix two leaks & improve leak tracking (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/lazy/SkBitmapFactory.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 2013 Google Inc. 2 * Copyright 2013 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 "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrEffect.h" 10 #include "GrEffect.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 GrEffectRef* EllipseEdgeEffect::TestCreate(SkMWCRandom* random, 280 GrEffectRef* EllipseEdgeEffect::TestCreate(SkMWCRandom* random,
281 GrContext* context, 281 GrContext* context,
282 const GrDrawTargetCaps&, 282 const GrDrawTargetCaps&,
283 GrTexture* textures[]) { 283 GrTexture* textures[]) {
284 return EllipseEdgeEffect::Create(random->nextBool()); 284 return EllipseEdgeEffect::Create(random->nextBool());
285 } 285 }
286 286
287 /////////////////////////////////////////////////////////////////////////////// 287 ///////////////////////////////////////////////////////////////////////////////
288 288
289 void GrOvalRenderer::reset() {
290 GrSafeSetNull(fRRectIndexBuffer);
291 }
292
289 bool GrOvalRenderer::drawOval(GrDrawTarget* target, const GrContext* context, bo ol useAA, 293 bool GrOvalRenderer::drawOval(GrDrawTarget* target, const GrContext* context, bo ol useAA,
290 const GrRect& oval, const SkStrokeRec& stroke) 294 const GrRect& oval, const SkStrokeRec& stroke)
291 { 295 {
292 if (!useAA) { 296 if (!useAA) {
293 return false; 297 return false;
294 } 298 }
295 299
296 const SkMatrix& vm = context->getMatrix(); 300 const SkMatrix& vm = context->getMatrix();
297 301
298 // we can draw circles 302 // we can draw circles
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 } 850 }
847 851
848 // drop out the middle quad if we're stroked 852 // drop out the middle quad if we're stroked
849 int indexCnt = isStroked ? GR_ARRAY_COUNT(gRRectIndices)-6 : GR_ARRAY_CO UNT(gRRectIndices); 853 int indexCnt = isStroked ? GR_ARRAY_COUNT(gRRectIndices)-6 : GR_ARRAY_CO UNT(gRRectIndices);
850 target->setIndexSourceToBuffer(indexBuffer); 854 target->setIndexSourceToBuffer(indexBuffer);
851 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds); 855 target->drawIndexed(kTriangles_GrPrimitiveType, 0, 0, 16, indexCnt, &bou nds);
852 } 856 }
853 857
854 return true; 858 return true;
855 } 859 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/lazy/SkBitmapFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698