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

Side by Side Diff: src/gpu/GrPlotMgr.h

Issue 23566022: move GrMalloc, GrFree, Gr_bzero to their sk equivalents (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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/GrMemoryPool.cpp ('k') | src/gpu/GrRectanizer.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 2010 Google Inc. 2 * Copyright 2010 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 #ifndef GrPlotMgr_DEFINED 8 #ifndef GrPlotMgr_DEFINED
9 #define GrPlotMgr_DEFINED 9 #define GrPlotMgr_DEFINED
10 10
(...skipping 14 matching lines...) Expand all
25 this->reset(); 25 this->reset();
26 } 26 }
27 27
28 ~GrPlotMgr() { 28 ~GrPlotMgr() {
29 if (fBusy != fStorage) { 29 if (fBusy != fStorage) {
30 delete[] fBusy; 30 delete[] fBusy;
31 } 31 }
32 } 32 }
33 33
34 void reset() { 34 void reset() {
35 Gr_bzero(fBusy, fDim.fX * fDim.fY); 35 sk_bzero(fBusy, fDim.fX * fDim.fY);
36 } 36 }
37 37
38 bool newPlot(GrIPoint16* loc) { 38 bool newPlot(GrIPoint16* loc) {
39 char* busy = fBusy; 39 char* busy = fBusy;
40 for (int y = 0; y < fDim.fY; y++) { 40 for (int y = 0; y < fDim.fY; y++) {
41 for (int x = 0; x < fDim.fX; x++) { 41 for (int x = 0; x < fDim.fX; x++) {
42 if (!*busy) { 42 if (!*busy) {
43 *busy = true; 43 *busy = true;
44 loc->set(x, y); 44 loc->set(x, y);
45 return true; 45 return true;
(...skipping 19 matching lines...) Expand all
65 private: 65 private:
66 enum { 66 enum {
67 STORAGE = 64 67 STORAGE = 64
68 }; 68 };
69 char fStorage[STORAGE]; 69 char fStorage[STORAGE];
70 char* fBusy; 70 char* fBusy;
71 GrIPoint16 fDim; 71 GrIPoint16 fDim;
72 }; 72 };
73 73
74 #endif 74 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrMemoryPool.cpp ('k') | src/gpu/GrRectanizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698