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

Unified Diff: src/effects/SkTableColorFilter.cpp

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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/effects/SkTableColorFilter.cpp
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 4cf09877c4d53f93a69f8734bb417d7447ac236c..74d39a6f61842016e6bfcab9d416941e1c4c9b6d 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -168,8 +168,6 @@ static const uint8_t gCountNibBits[] = {
#include "SkPackBits.h"
void SkTable_ColorFilter::flatten(SkWriteBuffer& buffer) const {
- this->INHERITED::flatten(buffer);
-
uint8_t storage[5*256];
int count = gCountNibBits[fFlags & 0xF];
size_t size = SkPackBits::Pack8(fStorage, count * 256, storage);
@@ -181,6 +179,13 @@ void SkTable_ColorFilter::flatten(SkWriteBuffer& buffer) const {
buffer.writeByteArray(storage, size);
}
+SkFlattenable* SkTable_ColorFilter::CreateProc(SkReadBuffer& buffer) {
+ // TODO
+ sk_throw();
+ return NULL;
+}
+
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
SkTable_ColorFilter::SkTable_ColorFilter(SkReadBuffer& buffer) : INHERITED(buffer) {
fBitmap = NULL;
@@ -199,6 +204,7 @@ SkTable_ColorFilter::SkTable_ColorFilter(SkReadBuffer& buffer) : INHERITED(buffe
SkDEBUGCODE(size_t count = gCountNibBits[fFlags & 0xF]);
SkASSERT(raw == count * 256);
}
+#endif
bool SkTable_ColorFilter::asComponentTable(SkBitmap* table) const {
if (table) {

Powered by Google App Engine
This is Rietveld 408576698