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

Unified Diff: src/gpu/GrPlotMgr.h

Issue 1231163002: remove some unused stuff (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrTBSearch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPlotMgr.h
diff --git a/src/gpu/GrPlotMgr.h b/src/gpu/GrPlotMgr.h
deleted file mode 100644
index 1441611327403524ae1546333efc9726e4430114..0000000000000000000000000000000000000000
--- a/src/gpu/GrPlotMgr.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrPlotMgr_DEFINED
-#define GrPlotMgr_DEFINED
-
-#include "GrTypes.h"
-#include "SkTypes.h"
-
-class GrPlotMgr : SkNoncopyable {
-public:
- GrPlotMgr(int width, int height) {
- fDim.set(width, height);
- size_t needed = width * height;
- if (needed <= sizeof(fStorage)) {
- fBusy = fStorage;
- } else {
- fBusy = SkNEW_ARRAY(char, needed);
- }
- this->reset();
- }
-
- ~GrPlotMgr() {
- if (fBusy != fStorage) {
- delete[] fBusy;
- }
- }
-
- void reset() {
- sk_bzero(fBusy, fDim.fX * fDim.fY);
- }
-
- bool newPlot(SkIPoint16* loc) {
- char* busy = fBusy;
- for (int y = 0; y < fDim.fY; y++) {
- for (int x = 0; x < fDim.fX; x++) {
- if (!*busy) {
- *busy = true;
- loc->set(x, y);
- return true;
- }
- busy++;
- }
- }
- return false;
- }
-
- bool isBusy(int x, int y) const {
- SkASSERT((unsigned)x < (unsigned)fDim.fX);
- SkASSERT((unsigned)y < (unsigned)fDim.fY);
- return fBusy[y * fDim.fX + x] != 0;
- }
-
- void freePlot(int x, int y) {
- SkASSERT((unsigned)x < (unsigned)fDim.fX);
- SkASSERT((unsigned)y < (unsigned)fDim.fY);
- fBusy[y * fDim.fX + x] = false;
- }
-
-private:
- enum {
- STORAGE = 64
- };
- char fStorage[STORAGE];
- char* fBusy;
- SkIPoint16 fDim;
-};
-
-#endif
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrTBSearch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698