Rolling back r5732 due to Chrome Mac compiler issues

git-svn-id: http://skia.googlecode.com/svn/trunk@5744 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2012-09-30 21:05:15 +00:00
parent 45369a33bb
commit 35e535a10f
2 changed files with 12 additions and 0 deletions

View File

@ -106,6 +106,12 @@ public:
*/
SkDevice* getTopDevice(bool updateMatrixClip = false) const;
/**
* Create a new raster device and make it current. This also returns
* the new device.
*/
SkDevice* setBitmapDevice(const SkBitmap& bitmap);
/**
* Shortcut for getDevice()->createCompatibleDevice(...).
* If getDevice() == NULL, this method does nothing, and returns NULL.

View File

@ -614,6 +614,12 @@ SkDevice* SkCanvas::setDevice(SkDevice* device) {
return device;
}
SkDevice* SkCanvas::setBitmapDevice(const SkBitmap& bitmap) {
SkDevice* device = this->setDevice(SkNEW_ARGS(SkDevice, (bitmap)));
device->unref();
return device;
}
bool SkCanvas::readPixels(SkBitmap* bitmap,
int x, int y,
Config8888 config8888) {