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

Unified Diff: skia/images/SkScaledBitmapSampler.h

Issue 113827: Remove the remainder of the skia source code from the Chromium repo.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « skia/images/SkMovie_gif.cpp ('k') | skia/images/SkScaledBitmapSampler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/images/SkScaledBitmapSampler.h
===================================================================
--- skia/images/SkScaledBitmapSampler.h (revision 16859)
+++ skia/images/SkScaledBitmapSampler.h (working copy)
@@ -1,55 +0,0 @@
-#ifndef SkScaledBitmapSampler_DEFINED
-#define SkScaledBitmapSampler_DEFINED
-
-#include "SkTypes.h"
-
-class SkBitmap;
-
-class SkScaledBitmapSampler {
-public:
- SkScaledBitmapSampler(int origWidth, int origHeight, int cellSize);
-
- int scaledWidth() const { return fScaledWidth; }
- int scaledHeight() const { return fScaledHeight; }
-
- int srcY0() const { return fY0; }
- int srcDY() const { return fDY; }
-
- enum SrcConfig {
- kGray, // 1 byte per pixel
- kIndex, // 1 byte per pixel
- kRGB, // 3 bytes per pixel
- kRGBX, // 4 byes per pixel (ignore 4th)
- kRGBA // 4 bytes per pixel
- };
-
- // Given a dst bitmap (with pixels already allocated) and a src-config,
- // prepares iterator to process the src colors and write them into dst.
- // Returns false if the request cannot be fulfulled.
- bool begin(SkBitmap* dst, SrcConfig sc, bool doDither);
- // call with row of src pixels, for y = 0...scaledHeight-1.
- // returns true if the row had non-opaque alpha in it
- bool next(const uint8_t* SK_RESTRICT src);
-
-private:
- int fScaledWidth;
- int fScaledHeight;
-
- int fX0; // first X coord to sample
- int fY0; // first Y coord (scanline) to sample
- int fDX; // step between X samples
- int fDY; // step between Y samples
-
- typedef bool (*RowProc)(void* SK_RESTRICT dstRow,
- const uint8_t* SK_RESTRICT src,
- int width, int deltaSrc, int y);
-
- // setup state
- char* fDstRow; // points into bitmap's pixels
- int fDstRowBytes;
- int fCurrY; // used for dithering
- int fSrcPixelSize; // 1, 3, 4
- RowProc fRowProc;
-};
-
-#endif
« no previous file with comments | « skia/images/SkMovie_gif.cpp ('k') | skia/images/SkScaledBitmapSampler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698