Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@13845 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
d9cdff67a4
commit
db0c875377
@ -17,7 +17,7 @@ class PremulAndUnpremulAlphaOpsBench : public SkBenchmark {
|
||||
H = 256,
|
||||
};
|
||||
SkBitmap fBmp1, fBmp2;
|
||||
|
||||
|
||||
public:
|
||||
PremulAndUnpremulAlphaOpsBench(SkColorType ct) {
|
||||
fColorType = ct;
|
||||
@ -39,7 +39,7 @@ protected:
|
||||
*fBmp1.getAddr32(w, h) = SkColorSetARGB(h & 0xFF, w & 0xFF, w & 0xFF, w & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fBmp2.allocPixels(info); // used in readPixels()
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ bool SkBitmapDevice::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, s
|
||||
if (NULL == fBitmap.getPixels()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
SkImageInfo srcInfo = fBitmap.info();
|
||||
|
||||
// perhaps can relax these in the future
|
||||
@ -323,7 +323,7 @@ bool SkBitmapDevice::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, s
|
||||
|
||||
srcInfo.fWidth = dstInfo.width();
|
||||
srcInfo.fHeight = dstInfo.height();
|
||||
|
||||
|
||||
const void* srcPixels = fBitmap.getAddr(x, y);
|
||||
const size_t srcRowBytes = fBitmap.rowBytes();
|
||||
|
||||
|
@ -748,12 +748,12 @@ bool SkCanvas::readPixels(const SkImageInfo& origInfo, void* dstP, size_t rowByt
|
||||
if (!srcR.intersect(0, 0, size.width(), size.height())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
SkImageInfo info = origInfo;
|
||||
// the intersect may have shrunk info's logical size
|
||||
info.fWidth = srcR.width();
|
||||
info.fHeight = srcR.height();
|
||||
|
||||
|
||||
// if x or y are negative, then we have to adjust pixels
|
||||
if (x > 0) {
|
||||
x = 0;
|
||||
@ -763,7 +763,7 @@ bool SkCanvas::readPixels(const SkImageInfo& origInfo, void* dstP, size_t rowByt
|
||||
}
|
||||
// here x,y are either 0 or negative
|
||||
dstP = ((char*)dstP - y * rowBytes - x * info.bytesPerPixel());
|
||||
|
||||
|
||||
// The device can assert that the requested area is always contained in its bounds
|
||||
return device->readPixels(info, dstP, rowBytes, srcR.x(), srcR.y());
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ bool SkBaseDevice::readPixels(const SkImageInfo& info, void* dstP, size_t rowByt
|
||||
SkASSERT(dstP);
|
||||
SkASSERT(rowBytes >= info.minRowBytes());
|
||||
SkASSERT(x >= 0 && y >= 0);
|
||||
|
||||
|
||||
const SkImageInfo& srcInfo = this->imageInfo();
|
||||
SkASSERT(x + info.width() <= srcInfo.width());
|
||||
SkASSERT(y + info.height() <= srcInfo.height());
|
||||
|
@ -871,7 +871,7 @@ void SkPicturePlayback::draw(SkCanvas& canvas, SkDrawPictureCallback* callback)
|
||||
if (0 == activeOpsList.numOps()) {
|
||||
return; // nothing to draw
|
||||
}
|
||||
|
||||
|
||||
// Since the opList is valid we know it is our derived class
|
||||
activeOps = &((const CachedOperationList&)activeOpsList).fOps;
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ bool SkGpuDevice::onReadPixels(const SkBitmap& bitmap,
|
||||
SkASSERT(SkBitmap::kARGB_8888_Config == bitmap.config());
|
||||
SkASSERT(!bitmap.isNull());
|
||||
SkASSERT(SkIRect::MakeWH(this->width(), this->height()).contains(SkIRect::MakeXYWH(x, y, bitmap.width(), bitmap.height())));
|
||||
|
||||
|
||||
SkAutoLockPixels alp(bitmap);
|
||||
GrPixelConfig config;
|
||||
uint32_t flags;
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "SkBitmap.h"
|
||||
|
||||
namespace sk_tool_utils {
|
||||
|
||||
|
||||
const char* colortype_name(SkColorType);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user