Skip to content

Commit

Permalink
Remove (now obsolete) IsNativeFontRendering api
Browse files Browse the repository at this point in the history
Review URL: http://codereview.chromium.org/7482045

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94905 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
reed@google.com committed Aug 1, 2011
1 parent 0e50fc4 commit f7d1f75
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 27 deletions.
4 changes: 1 addition & 3 deletions skia/ext/platform_canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ SkDevice* GetTopDevice(const SkCanvas& canvas) {
}

bool SupportsPlatformPaint(const SkCanvas* canvas) {
// TODO(alokp): Rename IsNativeFontRenderingAllowed after removing these
// calls from WebKit.
PlatformDevice* platform_device = GetPlatformDevice(GetTopDevice(*canvas));
return platform_device && platform_device->IsNativeFontRenderingAllowed();
return platform_device;
}

PlatformSurface BeginPlatformPaint(SkCanvas* canvas) {
Expand Down
4 changes: 0 additions & 4 deletions skia/ext/platform_device_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ PlatformDevice::PlatformDevice(const SkBitmap& bitmap)
SetPlatformDevice(this, this);
}

bool PlatformDevice::IsNativeFontRenderingAllowed() {
return true;
}

void PlatformDevice::EndPlatformPaint() {
// We don't need to do anything on Linux here.
}
Expand Down
3 changes: 0 additions & 3 deletions skia/ext/platform_device_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ class PlatformDevice : public SkDevice {
public:
typedef cairo_t* PlatformSurface;

// Returns if native platform APIs are allowed to render text to this device.
virtual bool IsNativeFontRenderingAllowed();

virtual PlatformSurface BeginPlatformPaint() = 0;
virtual void EndPlatformPaint();

Expand Down
4 changes: 0 additions & 4 deletions skia/ext/platform_device_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ PlatformDevice::PlatformDevice(const SkBitmap& bitmap)
SetPlatformDevice(this, this);
}

bool PlatformDevice::IsNativeFontRenderingAllowed() {
return true;
}

CGContextRef PlatformDevice::BeginPlatformPaint() {
return GetBitmapContext();
}
Expand Down
3 changes: 0 additions & 3 deletions skia/ext/platform_device_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ class PlatformDevice : public SkDevice {
// Sets the opacity of each pixel in the specified region to be opaque.
virtual void MakeOpaque(int x, int y, int width, int height) { }

// Returns if native platform APIs are allowed to render text to this device.
virtual bool IsNativeFontRenderingAllowed();

virtual PlatformSurface BeginPlatformPaint();
virtual void EndPlatformPaint();

Expand Down
3 changes: 0 additions & 3 deletions skia/ext/platform_device_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ class SK_API PlatformDevice : public SkDevice {
// Sets the opacity of each pixel in the specified region to be opaque.
virtual void MakeOpaque(int x, int y, int width, int height) { }

// Returns if GDI is allowed to render text to this device.
virtual bool IsNativeFontRenderingAllowed() { return true; }

// Loads a SkPath into the GDI context. The path can there after be used for
// clipping or as a stroke. Returns false if the path failed to be loaded.
static bool LoadPathToDC(HDC context, const SkPath& path);
Expand Down
4 changes: 0 additions & 4 deletions skia/ext/vector_platform_device_skia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ VectorPlatformDeviceSkia::VectorPlatformDeviceSkia(SkPDFDevice* pdf_device)
VectorPlatformDeviceSkia::~VectorPlatformDeviceSkia() {
}

bool VectorPlatformDeviceSkia::IsNativeFontRenderingAllowed() {
return false;
}

PlatformDevice::PlatformSurface VectorPlatformDeviceSkia::BeginPlatformPaint() {
// Even when drawing a vector representation of the page, we have to
// provide a raster surface for plugins to render into - they don't have
Expand Down
3 changes: 0 additions & 3 deletions skia/ext/vector_platform_device_skia.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class VectorPlatformDeviceSkia : public PlatformDevice {

SkPDFDevice* PdfDevice() { return pdf_device_.get(); }

// PlatformDevice methods.
virtual bool IsNativeFontRenderingAllowed();

virtual PlatformSurface BeginPlatformPaint();
virtual void EndPlatformPaint();
#if defined(OS_WIN)
Expand Down

0 comments on commit f7d1f75

Please sign in to comment.