aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmap.cpp
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-05 19:22:27 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-05 19:22:27 +0000
commit9349101b6cee7c4cfb570925a727c0bf7b0c676e (patch)
treefe60941df0ab676b6c4f4dfd7d8b31486d989a51 /src/core/SkBitmap.cpp
parent493c65f1aa0864857c21b2be096740a17ef1430a (diff)
Implement support for origin-TopLeft render targets in GL backend.
Committed: https://code.google.com/p/skia/source/detail?r=7545 Reverted in r7571; re-opening. Review URL: https://codereview.appspot.com/7230049 git-svn-id: http://skia.googlecode.com/svn/trunk@7592 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBitmap.cpp')
-rw-r--r--src/core/SkBitmap.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index e5a202c540..718a3fd365 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -828,10 +828,6 @@ void SkBitmap::eraseARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) const {
#define SUB_OFFSET_FAILURE ((size_t)-1)
-// Declare these non-static so they can be tested by GpuBitmapCopyTest.
-size_t getSubOffset(const SkBitmap& bm, int x, int y);
-bool getUpperLeftFromOffset(const SkBitmap& bm, int* x, int* y);
-
/**
* Based on the Config and rowBytes() of bm, return the offset into an SkPixelRef of the pixel at
* (x, y).
@@ -839,7 +835,7 @@ bool getUpperLeftFromOffset(const SkBitmap& bm, int* x, int* y);
* Also note that (x, y) may be outside the range of (0 - width(), 0 - height()), so long as it is
* within the bounds of the SkPixelRef being used.
*/
-size_t getSubOffset(const SkBitmap& bm, int x, int y) {
+static size_t getSubOffset(const SkBitmap& bm, int x, int y) {
switch (bm.getConfig()) {
case SkBitmap::kA8_Config:
case SkBitmap:: kIndex8_Config:
@@ -868,7 +864,7 @@ size_t getSubOffset(const SkBitmap& bm, int x, int y) {
* upper left corner of bm relative to its SkPixelRef.
* x and y must be non-NULL.
*/
-bool getUpperLeftFromOffset(const SkBitmap& bm, int* x, int* y) {
+static bool getUpperLeftFromOffset(const SkBitmap& bm, int* x, int* y) {
SkASSERT(x != NULL && y != NULL);
const size_t offset = bm.pixelRefOffset();
if (0 == offset) {