implicitly opaque.
*/
virtual bool isOpaque() const = 0;
-
+
/** DEPRECATED - Return the bitmap config of the device's pixels
*/
virtual SkBitmap::Config config() const = 0;
///////////////////////////////////////////////////////////////////////////
/** Update as needed the pixel value in the bitmap, so that the caller can
- access the pixels directly.
+ access the pixels directly.
@return The device contents as a bitmap
*/
virtual const SkBitmap& onAccessBitmap() = 0;
///////////////////////////////////////////////////////////////////////////////
-SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap)
+SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap)
: fBitmap(bitmap) {
SkASSERT(SkBitmap::kARGB_4444_Config != bitmap.config());
}
SkBaseDevice::SkBaseDevice()
- : fLeakyProperties(SkDeviceProperties::MakeDefault())
+ : fLeakyProperties(SkDeviceProperties::MakeDefault())
#ifdef SK_DEBUG
, fAttachedToCanvas(false)
#endif
int width, int height,
bool isOpaque,
Usage usage) {
- return SkNEW_ARGS(SkBitmapDevice,(config, width, height, isOpaque,
+ return SkNEW_ARGS(SkBitmapDevice,(config, width, height, isOpaque,
this->getDeviceProperties()));
}
return false;
}
- if (inverse) {
- double invXScale = 1 / fMat[0][0];
- double invYScale = 1 / fMat[1][1];
- double invZScale = 1 / fMat[2][2];
-
+ if (inverse) {
+ double invXScale = 1 / fMat[0][0];
+ double invYScale = 1 / fMat[1][1];
+ double invZScale = 1 / fMat[2][2];
+
inverse->fMat[0][0] = invXScale;
- inverse->fMat[0][1] = 0;
- inverse->fMat[0][2] = 0;
- inverse->fMat[0][3] = 0;
-
- inverse->fMat[1][0] = 0;
- inverse->fMat[1][1] = invYScale;
- inverse->fMat[1][2] = 0;
- inverse->fMat[1][3] = 0;
-
- inverse->fMat[2][0] = 0;
+ inverse->fMat[0][1] = 0;
+ inverse->fMat[0][2] = 0;
+ inverse->fMat[0][3] = 0;
+
+ inverse->fMat[1][0] = 0;
+ inverse->fMat[1][1] = invYScale;
+ inverse->fMat[1][2] = 0;
+ inverse->fMat[1][3] = 0;
+
+ inverse->fMat[2][0] = 0;
inverse->fMat[2][1] = 0;
- inverse->fMat[2][2] = invZScale;
- inverse->fMat[2][3] = 0;
-
+ inverse->fMat[2][2] = invZScale;
+ inverse->fMat[2][3] = 0;
+
inverse->fMat[3][0] = -fMat[3][0] * invXScale;
inverse->fMat[3][1] = -fMat[3][1] * invYScale;
inverse->fMat[3][2] = -fMat[3][2] * invZScale;
for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) {
SkAutoTUnref<SkBaseDevice> device;
if (0 == dtype) {
- device.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
+ device.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
DEV_W, DEV_H, false));
} else {
#if SK_SUPPORT_GPU