Chromium Code Reviews| Index: src/pdf/SkPDFDevice.cpp |
| diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp |
| index ff3878b803189d336541230425c87c847b0be631..efd2b02b50709a53d169d9697616563b3f168c59 100644 |
| --- a/src/pdf/SkPDFDevice.cpp |
| +++ b/src/pdf/SkPDFDevice.cpp |
| @@ -807,10 +807,6 @@ void SkPDFDevice::cleanUp(bool clearFontUsage) { |
| } |
| } |
| -uint32_t SkPDFDevice::getDeviceCapabilities() { |
| - return kVector_Capability; |
| -} |
| - |
| void SkPDFDevice::clear(SkColor color) { |
| this->cleanUp(true); |
| this->init(); |
| @@ -1341,13 +1337,7 @@ void SkPDFDevice::drawVertices(const SkDraw& d, SkCanvas::VertexMode, |
| void SkPDFDevice::drawDevice(const SkDraw& d, SkBaseDevice* device, |
| int x, int y, const SkPaint& paint) { |
| - if ((device->getDeviceCapabilities() & kVector_Capability) == 0) { |
| - // If we somehow get a raster device, do what our parent would do. |
| - INHERITED::drawDevice(d, device, x, y, paint); |
| - return; |
| - } |
| - |
| - // Assume that a vector capable device means that it's a PDF Device. |
| + // our onCreateDevice() always creates SkPDFDevice subclasses. |
|
vandebo (ex-Chrome)
2014/03/13 17:21:17
And onCreateDevice() is the only consumer of devic
reed1
2014/03/13 18:15:33
Correct. raster and gpu backends rely on the devic
|
| SkPDFDevice* pdfDevice = static_cast<SkPDFDevice*>(device); |
| if (pdfDevice->isContentEmpty()) { |
| return; |