diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-16 14:04:05 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-16 14:04:05 +0000 |
commit | 24ddde97581624777feebc9e95ae558282f95d4c (patch) | |
tree | f38d3bf0b93d5c7c070a4a788e153550f9491768 /include/core | |
parent | ba6e954140e45e251d67934ed6ad752149fcf72f (diff) |
Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11257 Canary build fix - https://codereview.chromium.org/23532068
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015
git-svn-id: http://skia.googlecode.com/svn/trunk@11288 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkBitmap.h | 1 | ||||
-rw-r--r-- | include/core/SkFlattenableBuffers.h | 26 | ||||
-rw-r--r-- | include/core/SkFlattenableSerialization.h | 14 | ||||
-rw-r--r-- | include/core/SkRect.h | 4 |
4 files changed, 4 insertions, 41 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h index 79b6fa6703..887169ccb5 100644 --- a/include/core/SkBitmap.h +++ b/include/core/SkBitmap.h @@ -52,7 +52,6 @@ public: kRGB_565_Config, //!< 16-bits per pixel, (see SkColorPriv.h for packing) kARGB_4444_Config, //!< 16-bits per pixel, (see SkColorPriv.h for packing) kARGB_8888_Config, //!< 32-bits per pixel, (see SkColorPriv.h for packing) - kLastConfig = kARGB_8888_Config, }; // do not add this to the Config enum, otherwise the compiler will let us diff --git a/include/core/SkFlattenableBuffers.h b/include/core/SkFlattenableBuffers.h index b3f3684daa..03c03f3877 100644 --- a/include/core/SkFlattenableBuffers.h +++ b/include/core/SkFlattenableBuffers.h @@ -41,20 +41,14 @@ public: kCrossProcess_Flag = 1 << 0, kScalarIsFloat_Flag = 1 << 1, kPtrIs64Bit_Flag = 1 << 2, - /** The kValidation_Flag is used to force stream validations (by making - * sure that no operation reads past the end of the stream, for example) - * and error handling if any reading operation yields an invalid value. - */ - kValidation_Flag = 1 << 3, }; void setFlags(uint32_t flags) { fFlags = flags; } uint32_t getFlags() const { return fFlags; } - bool isCrossProcess() const { return SkToBool(fFlags & (kCrossProcess_Flag | kValidation_Flag)); } + bool isCrossProcess() const { return SkToBool(fFlags & kCrossProcess_Flag); } bool isScalarFloat() const { return SkToBool(fFlags & kScalarIsFloat_Flag); } bool isPtr64Bit() const { return SkToBool(fFlags & kPtrIs64Bit_Flag); } - bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); } // primitives virtual bool readBool() = 0; @@ -108,13 +102,6 @@ public: return static_cast<T*>(this->readFlattenable()); } - void validate(bool isValid) { - fError |= !isValid; - } - -protected: - bool fError; - private: uint32_t fFlags; }; @@ -167,22 +154,13 @@ public: enum Flags { kCrossProcess_Flag = 0x01, - /** The kValidation_Flag is used here to make sure the write operation - * is symmetric with the read operation using the equivalent flag - * SkFlattenableReadBuffer::kValidation_Flag. - */ - kValidation_Flag = 0x02, }; uint32_t getFlags() const { return fFlags; } void setFlags(uint32_t flags) { fFlags = flags; } bool isCrossProcess() const { - return SkToBool(fFlags & (kCrossProcess_Flag | kValidation_Flag)); - } - - bool isValidating() const { - return SkToBool(fFlags & kValidation_Flag); + return SkToBool(fFlags & kCrossProcess_Flag); } bool persistTypeface() const { return (fFlags & kCrossProcess_Flag) != 0; } diff --git a/include/core/SkFlattenableSerialization.h b/include/core/SkFlattenableSerialization.h index 26463bbca9..2ed244c1ed 100644 --- a/include/core/SkFlattenableSerialization.h +++ b/include/core/SkFlattenableSerialization.h @@ -13,17 +13,7 @@ class SkData; class SkFlattenable; -/** - * These utility functions are used by the chromium codebase to safely - * serialize and deserialize SkFlattenable objects. These aren't made for - * optimal speed, but rather designed with security in mind in order to - * prevent Skia from being an entry point for potential attacks. - */ -SK_API SkData* SkValidatingSerializeFlattenable(SkFlattenable*); -SK_API SkFlattenable* SkValidatingDeserializeFlattenable(const void* data, size_t size); - -// Temporary fix for canary build -#define SkSerializeFlattenable SkValidatingSerializeFlattenable -#define SkDeserializeFlattenable SkValidatingDeserializeFlattenable +SK_API SkData* SkSerializeFlattenable(SkFlattenable*); +SK_API SkFlattenable* SkDeserializeFlattenable(const void* data, size_t size); #endif diff --git a/include/core/SkRect.h b/include/core/SkRect.h index bd5d026d50..d8919ae5d6 100644 --- a/include/core/SkRect.h +++ b/include/core/SkRect.h @@ -100,8 +100,6 @@ struct SK_API SkIRect { */ bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; } - bool isInverted() const { return fLeft > fRight || fTop > fBottom; } - bool isLargest() const { return SK_MinS32 == fLeft && SK_MinS32 == fTop && SK_MaxS32 == fRight && @@ -421,8 +419,6 @@ struct SK_API SkRect { */ bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; } - bool isInverted() const { return fLeft > fRight || fTop > fBottom; } - /** * Returns true iff all values in the rect are finite. If any are * infinite or NaN (or SK_FixedNaN when SkScalar is fixed) then this |