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

Side by Side Diff: experimental/AndroidPathRenderer/GrAndroidPathRenderer.cpp

Issue 695663003: Cleanup: Go with SkDebugf instead of GrPrintf. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | include/gpu/GrConfig.h » ('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 2012 Google Inc. 3 * Copyright 2012 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 #include "GrAndroidPathRenderer.h" 9 #include "GrAndroidPathRenderer.h"
10 #include "AndroidPathRenderer.h" 10 #include "AndroidPathRenderer.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 drawState->setAttribIndex(GrDrawState::kCoverage_AttribIndex, 1); 49 drawState->setAttribIndex(GrDrawState::kCoverage_AttribIndex, 1);
50 drawState->setAttribBindings(GrDrawState::kCoverage_AttribBindingsBit); 50 drawState->setAttribBindings(GrDrawState::kCoverage_AttribBindingsBit);
51 } else { 51 } else {
52 drawState->setDefaultVertexAttribs(); 52 drawState->setDefaultVertexAttribs();
53 } 53 }
54 54
55 // allocate our vert buffer 55 // allocate our vert buffer
56 int vertCount = vertices.getSize(); 56 int vertCount = vertices.getSize();
57 GrDrawTarget::AutoReleaseGeometry geo(target, vertCount, 0); 57 GrDrawTarget::AutoReleaseGeometry geo(target, vertCount, 0);
58 if (!geo.succeeded()) { 58 if (!geo.succeeded()) {
59 GrPrintf("Failed to get space for vertices!\n"); 59 SkDebugf("Failed to get space for vertices!\n");
60 return false; 60 return false;
61 } 61 }
62 62
63 // copy android verts to our vertex buffer 63 // copy android verts to our vertex buffer
64 if (antiAlias) { 64 if (antiAlias) {
65 SkASSERT(sizeof(ColorVertex) == drawState->getVertexSize()); 65 SkASSERT(sizeof(ColorVertex) == drawState->getVertexSize());
66 ColorVertex* outVert = reinterpret_cast<ColorVertex*>(geo.vertices()); 66 ColorVertex* outVert = reinterpret_cast<ColorVertex*>(geo.vertices());
67 android::uirenderer::AlphaVertex* inVert = 67 android::uirenderer::AlphaVertex* inVert =
68 reinterpret_cast<android::uirenderer::AlphaVertex*>(vertices.getBuff er()); 68 reinterpret_cast<android::uirenderer::AlphaVertex*>(vertices.getBuff er());
69 69
(...skipping 10 matching lines...) Expand all
80 size_t vsize = drawState->getVertexSize(); 80 size_t vsize = drawState->getVertexSize();
81 size_t copySize = vsize*vertCount; 81 size_t copySize = vsize*vertCount;
82 memcpy(geo.vertices(), vertices.getBuffer(), copySize); 82 memcpy(geo.vertices(), vertices.getBuffer(), copySize);
83 } 83 }
84 84
85 // render it 85 // render it
86 target->drawNonIndexed(kTriangleStrip_GrPrimitiveType, 0, vertCount); 86 target->drawNonIndexed(kTriangleStrip_GrPrimitiveType, 0, vertCount);
87 87
88 return true; 88 return true;
89 } 89 }
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698