aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkReadBuffer.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-12-13 11:38:57 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-13 17:02:10 +0000
commit45ab630045ec72dcc0c4546cc1e96ac518897896 (patch)
tree28f1de8bb01374e1adbb5af96969d130172d57de /src/core/SkReadBuffer.cpp
parentdde37e5f6613bec240b8ea9336e56f58ba63e418 (diff)
Revert "Revert "impl SkSerial picture procs""
This reverts commit 2a3009931d7bb0f5ca31490c4cf19eef205e4e7a. Implement SkSerialProcs for pictures Bug: skia: Change-Id: Icde2d912941a19999e204ac5213f519ed5387e12 Reviewed-on: https://skia-review.googlesource.com/84480 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkReadBuffer.cpp')
-rw-r--r--src/core/SkReadBuffer.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp
index c0be4f3490..94bf34af91 100644
--- a/src/core/SkReadBuffer.cpp
+++ b/src/core/SkReadBuffer.cpp
@@ -11,27 +11,13 @@
#include "SkImageDeserializer.h"
#include "SkImageGenerator.h"
#include "SkMakeUnique.h"
+#include "SkMathPriv.h"
#include "SkMatrixPriv.h"
#include "SkReadBuffer.h"
#include "SkStream.h"
#include "SkTypeface.h"
namespace {
- // If a signed int holds min_int (e.g. 0x80000000) it is undefined what happens when
- // we negate it (even though we *know* we're 2's complement and we'll get the same
- // value back). So we create this helper function that casts to size_t (unsigned) first,
- // to avoid the complaint.
- size_t sk_negate_to_size_t(int32_t value) {
-#if defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable : 4146) // Thanks MSVC, we know what we're negating an unsigned
-#endif
- return -static_cast<size_t>(value);
-#if defined(_MSC_VER)
-#pragma warning(pop)
-#endif
- }
-
// This generator intentionally should always fail on all attempts to get its pixels,
// simulating a bad or empty codec stream.
class EmptyImageGenerator final : public SkImageGenerator {