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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 198943003: getDeviceCapabilities is no longer need, so remove it (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
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;

Powered by Google App Engine
This is Rietveld 408576698