#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "ui/gfx/geometry/size_conversions.h"
+#if BUILDFLAG(IS_TIZEN)
+#include "third_party/blink/renderer/core/paint/paint_info.h"
+#endif
+
namespace blink {
LayoutImage::LayoutImage(Element* element)
void LayoutImage::Paint(const PaintInfo& paint_info) const {
NOT_DESTROYED();
+#if BUILDFLAG(IS_TIZEN)
+ // Do not request image rendering when image resource is loading
+ // for page loading performance.
+ if (paint_info.phase == PaintPhase::kForeground &&
+ !Style()->HasBoxDecorations() && image_resource_ &&
+ image_resource_->CachedImage() &&
+ image_resource_->CachedImage()->IsLoading()) {
+ return;
+ }
+#endif
ImagePainter(*this).Paint(paint_info);
}
DCHECK(all_data_received ||
size_available_ != Image::kSizeAvailableAndLoadingAsynchronously);
+#if BUILDFLAG(IS_TIZEN)
+ if (!notified_)
+ notified_ = true;
+ else if (!all_data_received)
+ return UpdateImageResult::kNoDecodeError;
+#endif
// Notifies the observers.
// It would be nice to only redraw the decoded band of the image, but with the
// current design (decoding delayed until painting) that seems hard.