| Index: third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp b/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
|
| index 4e9bd685c154dc2c69b912222e5e614d88d32365..89cdcb86a51f3e35f67d9bfd58a6ab131ae6df61 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
|
| @@ -12,6 +12,7 @@
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| #include "third_party/skia/include/core/SkImage.h"
|
| #include "third_party/skia/include/core/SkPaint.h"
|
| +#include "v8/include/v8.h"
|
|
|
| namespace blink {
|
|
|
| @@ -47,4 +48,16 @@ void StaticBitmapImage::DrawHelper(PaintCanvas* canvas,
|
| WebCoreClampingModeToSkiaRectConstraint(clamp_mode));
|
| }
|
|
|
| +void StaticBitmapImage::RegisterExternalAllocationWithCurrentContext() {
|
| + int externallyAllocatedMemory = Size().Width() * Size().Height() * 4;
|
| + v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(
|
| + static_cast<int64_t>(externallyAllocatedMemory));
|
| +}
|
| +
|
| +void StaticBitmapImage::UnregisterExternalAllocationWithCurrentContext() {
|
| + int externallyAllocatedMemory = Size().Width() * Size().Height() * 4;
|
| + v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(
|
| + -static_cast<int64_t>(externallyAllocatedMemory));
|
| +}
|
| +
|
| } // namespace blink
|
|
|