Index: third_party/WebKit/Source/core/loader/resource/ImageResource.h |
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResource.h b/third_party/WebKit/Source/core/loader/resource/ImageResource.h |
index 3872761ac4bf6f0448d118f47e8bff1a1a5c7a16..eecb2c080c139bd28ade22a7243cbe3f56d89a07 100644 |
--- a/third_party/WebKit/Source/core/loader/resource/ImageResource.h |
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResource.h |
@@ -25,6 +25,7 @@ |
#include "core/CoreExport.h" |
#include "core/fetch/Resource.h" |
+#include "core/loader/resource/ImageResourceContent.h" |
#include "core/loader/resource/ImageResourceInfo.h" |
#include "core/loader/resource/MultipartImageResourceParser.h" |
#include "platform/Timer.h" |
@@ -129,6 +130,12 @@ class CORE_EXPORT ImageResource final |
void destroyDecodedDataIfPossible() override; |
void destroyDecodedDataForFailedRevalidation() override; |
+ // When UpdateImageOption is UpdateImage but this is the first |
+ // updateImage() call, then ClearAndUpdateImage is used instead to enforce |
+ // new image creation. |
+ void updateImage(PassRefPtr<SharedBuffer>, |
+ ImageResourceContent::UpdateImageOption, |
+ bool allDataReceived); |
void flushImageIfNeeded(TimerBase*); |
bool shouldReloadBrokenPlaceholder() const { |
@@ -139,6 +146,11 @@ class CORE_EXPORT ImageResource final |
Member<ImageResourceContent> m_content; |
+ // Indicates whether updateImage() is called for this resource, or for this |
+ // part (in case of multipart images), and is used for enforcing creation of |
+ // new blink::Image in ImageResourceContent for the first updateImage(). |
+ bool m_isUpdateImageCalled = false; |
kouhei (in TOK)
2016/12/19 01:32:04
This flag name is quite confusing, as onePartIn~()
hiroshige
2016/12/27 23:25:31
Done in Patch Set 10.
|
+ |
// TODO(hiroshige): move |m_devicePixelRatioHeaderValue| and |
// |m_hasDevicePixelRatioHeaderValue| to ImageResourceContent and update |
// it via ImageResourceContent::updateImage(). |