Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054
git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index 661e017..81ebcbd 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -35,7 +35,7 @@
// code may need to be revised if that assumption is ever broken.
if (shader && !shader->asAGradient(NULL)) {
SkBitmap bm;
- if (shader->asABitmap(&bm, NULL, NULL) &&
+ if (shader->asABitmap(&bm, NULL, NULL) &&
NULL != bm.getTexture()) {
return true;
}
@@ -47,7 +47,7 @@
class AutoImmediateDrawIfNeeded {
public:
- AutoImmediateDrawIfNeeded(SkDeferredCanvas& canvas, const SkBitmap* bitmap,
+ AutoImmediateDrawIfNeeded(SkDeferredCanvas& canvas, const SkBitmap* bitmap,
const SkPaint* paint) {
this->init(canvas, bitmap, paint);
}
@@ -77,7 +77,7 @@
namespace {
-bool isPaintOpaque(const SkPaint* paint,
+bool isPaintOpaque(const SkPaint* paint,
const SkBitmap* bmpReplacesShader = NULL) {
// TODO: SkXfermode should have a virtual isOpaque method, which would
// make it possible to test modes that do not have a Coeff representation.
@@ -102,7 +102,7 @@
} else if (paint->getShader() && !paint->getShader()->isOpaque()) {
break;
}
- if (paint->getColorFilter() &&
+ if (paint->getColorFilter() &&
((paint->getColorFilter()->getFlags() &
SkColorFilter::kAlphaUnchanged_Flag) == 0)) {
break;
@@ -112,7 +112,7 @@
if (paint->getAlpha() != 0) {
break;
}
- if (paint->getColorFilter() &&
+ if (paint->getColorFilter() &&
((paint->getColorFilter()->getFlags() &
SkColorFilter::kAlphaUnchanged_Flag) == 0)) {
break;
@@ -203,7 +203,7 @@
}
void DeferredPipeController::playback() {
-
+
for (int currentBlock = 0; currentBlock < fBlockList.count(); currentBlock++ ) {
fReader.playback(fBlockList[currentBlock].fBlock, fBlockList[currentBlock].fSize);
}
@@ -376,10 +376,10 @@
void DeferredDevice::beginRecording() {
SkASSERT(NULL == fRecordingCanvas);
- fRecordingCanvas = fPipeWriter.startRecording(&fPipeController, 0,
+ fRecordingCanvas = fPipeWriter.startRecording(&fPipeController, 0,
fImmediateDevice->width(), fImmediateDevice->height());
}
-
+
void DeferredDevice::setNotificationClient(
SkDeferredCanvas::NotificationClient* notificationClient) {
fNotificationClient = notificationClient;
@@ -409,7 +409,7 @@
// Restore pre-purge state
if (!clipRegion.isEmpty()) {
- fRecordingCanvas->clipRegion(clipRegion,
+ fRecordingCanvas->clipRegion(clipRegion,
SkRegion::kReplace_Op);
}
if (!matrix.isIdentity()) {
@@ -475,7 +475,7 @@
storageAllocated = this->storageAllocatedForRecording();
}
- if (fNotificationClient &&
+ if (fNotificationClient &&
storageAllocated != fPreviousStorageAllocated) {
fPreviousStorageAllocated = storageAllocated;
fNotificationClient->storageAllocatedForRecordingChanged(storageAllocated);
@@ -486,16 +486,16 @@
return fRecordingCanvas;
}
-uint32_t DeferredDevice::getDeviceCapabilities() {
+uint32_t DeferredDevice::getDeviceCapabilities() {
return fImmediateDevice->getDeviceCapabilities();
}
-int DeferredDevice::width() const {
+int DeferredDevice::width() const {
return fImmediateDevice->width();
}
int DeferredDevice::height() const {
- return fImmediateDevice->height();
+ return fImmediateDevice->height();
}
SkGpuRenderTarget* DeferredDevice::accessRenderTarget() {
@@ -661,7 +661,7 @@
if (paint) {
SkPaint::Style paintStyle = paint->getStyle();
- if (!(paintStyle == SkPaint::kFill_Style ||
+ if (!(paintStyle == SkPaint::kFill_Style ||
paintStyle == SkPaint::kStrokeAndFill_Style)) {
return false;
}
@@ -673,8 +673,8 @@
// The following test holds with AA enabled, and is conservative
// by a 0.5 pixel margin with AA disabled
- if (transformedRect.fLeft > SkIntToScalar(0) ||
- transformedRect.fTop > SkIntToScalar(0) ||
+ if (transformedRect.fLeft > SkIntToScalar(0) ||
+ transformedRect.fTop > SkIntToScalar(0) ||
transformedRect.fRight < SkIntToScalar(canvasSize.fWidth) ||
transformedRect.fBottom < SkIntToScalar(canvasSize.fHeight)) {
return false;
@@ -686,8 +686,8 @@
{
SkIRect bounds;
canvas->getClipDeviceBounds(&bounds);
- if (bounds.fLeft > 0 || bounds.fTop > 0 ||
- bounds.fRight < canvasSize.fWidth ||
+ if (bounds.fLeft > 0 || bounds.fTop > 0 ||
+ bounds.fRight < canvasSize.fWidth ||
bounds.fBottom < canvasSize.fHeight)
return false;
}
@@ -808,7 +808,7 @@
}
void SkDeferredCanvas::drawPaint(const SkPaint& paint) {
- if (fDeferredDrawing && this->isFullFrame(NULL, &paint) &&
+ if (fDeferredDrawing && this->isFullFrame(NULL, &paint) &&
isPaintOpaque(&paint)) {
this->getDeferredDevice()->contentsCleared();
}
@@ -825,7 +825,7 @@
}
void SkDeferredCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
- if (fDeferredDrawing && this->isFullFrame(&rect, &paint) &&
+ if (fDeferredDrawing && this->isFullFrame(&rect, &paint) &&
isPaintOpaque(&paint)) {
this->getDeferredDevice()->contentsCleared();
}
@@ -845,7 +845,7 @@
SkScalar top, const SkPaint* paint) {
SkRect bitmapRect = SkRect::MakeXYWH(left, top,
SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height()));
- if (fDeferredDrawing &&
+ if (fDeferredDrawing &&
this->isFullFrame(&bitmapRect, paint) &&
isPaintOpaque(paint, &bitmap)) {
this->getDeferredDevice()->contentsCleared();
@@ -856,11 +856,11 @@
this->recordedDrawCommand();
}
-void SkDeferredCanvas::drawBitmapRect(const SkBitmap& bitmap,
+void SkDeferredCanvas::drawBitmapRect(const SkBitmap& bitmap,
const SkIRect* src,
const SkRect& dst,
const SkPaint* paint) {
- if (fDeferredDrawing &&
+ if (fDeferredDrawing &&
this->isFullFrame(&dst, paint) &&
isPaintOpaque(paint, &bitmap)) {
this->getDeferredDevice()->contentsCleared();
@@ -896,10 +896,10 @@
const SkPaint* paint) {
SkRect bitmapRect = SkRect::MakeXYWH(
SkIntToScalar(left),
- SkIntToScalar(top),
+ SkIntToScalar(top),
SkIntToScalar(bitmap.width()),
SkIntToScalar(bitmap.height()));
- if (fDeferredDrawing &&
+ if (fDeferredDrawing &&
this->isFullFrame(&bitmapRect, paint) &&
isPaintOpaque(paint, &bitmap)) {
this->getDeferredDevice()->contentsCleared();
@@ -966,10 +966,10 @@
}
SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) {
- this->drawingCanvas()->setDrawFilter(filter);
+ this->drawingCanvas()->setDrawFilter(filter);
this->INHERITED::setDrawFilter(filter);
this->recordedDrawCommand();
- return filter;
+ return filter;
}
SkCanvas* SkDeferredCanvas::canvasForDrawIter() {