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

Unified Diff: src/utils/SkDeferredCanvas.cpp

Issue 201973003: remove SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG -- dead code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | « src/gpu/SkGpuDevice.cpp ('k') | src/utils/SkGatherPixelRefsAndRects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkDeferredCanvas.cpp
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index 984fe05b2b60f48e918e8b7d2255b43f723bf9d4..9051874870b5884f62a273b28bcc10456e8fe441 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -167,10 +167,6 @@ public:
virtual SkBaseDevice* onCreateDevice(const SkImageInfo&, Usage) SK_OVERRIDE;
-#ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG
- virtual void writePixels(const SkBitmap& bitmap, int x, int y,
- SkCanvas::Config8888 config8888) SK_OVERRIDE;
-#endif
virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE;
protected:
@@ -473,37 +469,6 @@ void SkDeferredDevice::prepareForImmediatePixelWrite() {
fImmediateCanvas->flush();
}
-#ifdef SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG
-void SkDeferredDevice::writePixels(const SkBitmap& bitmap, int x, int y,
- SkCanvas::Config8888 config8888) {
-
- if (x <= 0 && y <= 0 && (x + bitmap.width()) >= width() &&
- (y + bitmap.height()) >= height()) {
- this->skipPendingCommands();
- }
-
- if (SkBitmap::kARGB_8888_Config == bitmap.config() &&
- SkCanvas::kNative_Premul_Config8888 != config8888 &&
- kPMColorAlias != config8888) {
- //Special case config: no deferral
- prepareForImmediatePixelWrite();
- immediateDevice()->writePixels(bitmap, x, y, config8888);
- return;
- }
-
- SkPaint paint;
- paint.setXfermodeMode(SkXfermode::kSrc_Mode);
- if (shouldDrawImmediately(&bitmap, NULL, getBitmapSizeThreshold())) {
- prepareForImmediatePixelWrite();
- fImmediateCanvas->drawSprite(bitmap, x, y, &paint);
- } else {
- this->recordingCanvas()->drawSprite(bitmap, x, y, &paint);
- this->recordedDrawCommand();
-
- }
-}
-#endif
-
bool SkDeferredDevice::onWritePixels(const SkImageInfo& info, const void* pixels, size_t rowBytes,
int x, int y) {
SkASSERT(x >= 0 && y >= 0);
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/utils/SkGatherPixelRefsAndRects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698