remove SK_SUPPORT_LEGACY_DEVICE_CONFIG code
BUG=skia: R=djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/327263002
This commit is contained in:
parent
b8cd7c253f
commit
4585144956
@ -676,7 +676,6 @@
|
||||
'SK_SUPPORT_LEGACY_LAYERRASTERIZER_API=1',
|
||||
'SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG=1',
|
||||
'SK_SUPPORT_LEGACY_GETTOTALCLIP=1',
|
||||
'SK_SUPPORT_LEGACY_DEVICE_CONFIG=1',
|
||||
],
|
||||
}],
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
#
|
||||
'skia_for_android_framework_defines': [
|
||||
'SK_SUPPORT_LEGACY_SETCONFIG_INFO',
|
||||
'SK_SUPPORT_LEGACY_DEVICE_CONFIG',
|
||||
'SK_SUPPORT_LEGACY_SETCONFIG',
|
||||
# Needed until we fix skbug.com/2440.
|
||||
'SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG',
|
||||
|
@ -45,12 +45,6 @@ public:
|
||||
*/
|
||||
virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); }
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
/** Return the bitmap config of the device's pixels
|
||||
*/
|
||||
virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config(); }
|
||||
#endif
|
||||
|
||||
virtual SkImageInfo imageInfo() const SK_OVERRIDE;
|
||||
|
||||
/**
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Copyright 2010 The Android Open Source Project
|
||||
*
|
||||
@ -6,7 +5,6 @@
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SkDevice_DEFINED
|
||||
#define SkDevice_DEFINED
|
||||
|
||||
@ -76,18 +74,11 @@ public:
|
||||
bounds->setXYWH(origin.x(), origin.y(), this->width(), this->height());
|
||||
}
|
||||
|
||||
|
||||
/** Returns true if the device's bitmap's config treats every pixel as
|
||||
implicitly opaque.
|
||||
*/
|
||||
virtual bool isOpaque() const = 0;
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
/** Return the bitmap config of the device's pixels
|
||||
*/
|
||||
virtual SkBitmap::Config config() const = 0;
|
||||
#endif
|
||||
|
||||
/** Return the bitmap associated with this device. Call this each time you need
|
||||
to access the bitmap, as it notifies the subclass to perform any flushing
|
||||
etc. before you examine the pixels.
|
||||
|
@ -82,9 +82,6 @@ public:
|
||||
return NULL == fRenderTarget ? false
|
||||
: kRGB_565_GrPixelConfig == fRenderTarget->config();
|
||||
}
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
virtual SkBitmap::Config config() const SK_OVERRIDE;
|
||||
#endif
|
||||
|
||||
virtual void clear(SkColor color) SK_OVERRIDE;
|
||||
virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE;
|
||||
|
@ -51,11 +51,6 @@ public:
|
||||
virtual int width() const SK_OVERRIDE { return fInfo.fSize.width(); }
|
||||
virtual int height() const SK_OVERRIDE { return fInfo.fSize.height(); }
|
||||
virtual bool isOpaque() const SK_OVERRIDE { return false; }
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
virtual SkBitmap::Config config() const SK_OVERRIDE {
|
||||
return SkBitmap::kNo_Config;
|
||||
}
|
||||
#endif
|
||||
virtual SkImageInfo imageInfo() const SK_OVERRIDE {
|
||||
return fEmptyBitmap.info();
|
||||
}
|
||||
|
@ -352,15 +352,6 @@ SK_COMPILE_ASSERT(SkShader::kLast_BitmapType == 6, shader_type_mismatch);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
SkBitmap::Config SkGpuDevice::config() const {
|
||||
if (NULL == fRenderTarget) {
|
||||
return SkBitmap::kNo_Config;
|
||||
}
|
||||
return SkColorTypeToBitmapConfig(fRenderTarget->info().colorType());
|
||||
}
|
||||
#endif
|
||||
|
||||
void SkGpuDevice::clear(SkColor color) {
|
||||
SkIRect rect = SkIRect::MakeWH(this->width(), this->height());
|
||||
fContext->clear(&rect, SkColor2GrColor(color), true, fRenderTarget);
|
||||
|
@ -159,9 +159,6 @@ public:
|
||||
|
||||
virtual int width() const SK_OVERRIDE;
|
||||
virtual int height() const SK_OVERRIDE;
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
virtual SkBitmap::Config config() const SK_OVERRIDE;
|
||||
#endif
|
||||
virtual bool isOpaque() const SK_OVERRIDE;
|
||||
virtual SkImageInfo imageInfo() const SK_OVERRIDE;
|
||||
|
||||
@ -437,12 +434,6 @@ int SkDeferredDevice::height() const {
|
||||
return immediateDevice()->height();
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
SkBitmap::Config SkDeferredDevice::config() const {
|
||||
return immediateDevice()->config();
|
||||
}
|
||||
#endif
|
||||
|
||||
bool SkDeferredDevice::isOpaque() const {
|
||||
return immediateDevice()->isOpaque();
|
||||
}
|
||||
|
@ -38,11 +38,6 @@ public:
|
||||
virtual int width() const SK_OVERRIDE { return fSize.width(); }
|
||||
virtual int height() const SK_OVERRIDE { return fSize.height(); }
|
||||
virtual bool isOpaque() const SK_OVERRIDE { return false; }
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
virtual SkBitmap::Config config() const SK_OVERRIDE {
|
||||
return SkBitmap::kNo_Config;
|
||||
}
|
||||
#endif
|
||||
virtual SkImageInfo imageInfo() const SK_OVERRIDE {
|
||||
return fEmptyBitmap.info();
|
||||
}
|
||||
|
@ -61,11 +61,6 @@ public:
|
||||
virtual int width() const SK_OVERRIDE { return fSize.width(); }
|
||||
virtual int height() const SK_OVERRIDE { return fSize.height(); }
|
||||
virtual bool isOpaque() const SK_OVERRIDE { return false; }
|
||||
#ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
|
||||
virtual SkBitmap::Config config() const SK_OVERRIDE {
|
||||
return SkBitmap::kNo_Config;
|
||||
}
|
||||
#endif
|
||||
virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; }
|
||||
virtual bool filterTextFlags(const SkPaint& paint, TextFlags*) SK_OVERRIDE {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user