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

Unified Diff: src/gpu/GrTBSearch.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 | « src/gpu/GrPlotMgr.h ('k') | src/gpu/GrTemplates.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTBSearch.h
diff --git a/src/gpu/GrTBSearch.h b/src/gpu/GrTBSearch.h
deleted file mode 100644
index 01e97440a65135ab4511a537fb2767e2db865cfb..0000000000000000000000000000000000000000
--- a/src/gpu/GrTBSearch.h
+++ /dev/null
@@ -1,44 +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 GrTBSearch_DEFINED
-#define GrTBSearch_DEFINED
-
-#include "SkTypes.h"
-
-template <typename ELEM, typename KEY>
-int GrTBSearch(const ELEM array[], int count, KEY target) {
- SkASSERT(count >= 0);
- if (0 == count) {
- // we should insert it at 0
- return ~0;
- }
-
- int high = count - 1;
- int low = 0;
- while (high > low) {
- int index = (low + high) >> 1;
- if (LT(array[index], target)) {
- low = index + 1;
- } else {
- high = index;
- }
- }
-
- // check if we found it
- if (EQ(array[high], target)) {
- return high;
- }
-
- // now return the ~ of where we should insert it
- if (LT(array[high], target)) {
- high += 1;
- }
- return ~high;
-}
-
-#endif
« no previous file with comments | « src/gpu/GrPlotMgr.h ('k') | src/gpu/GrTemplates.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698