Commit 06453a37 authored by Wan-Teh Chang's avatar Wan-Teh Chang Committed by Commit Bot

Rename the have_already_parsed_this_data_ member

Peter Kasting suggested the new name have_parsed_current_data_ in
https://crrev.com/c/2530221.

Change-Id: I8f96f40fc09206f74ffb2ce4815b3a10230ba7b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2538959Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827615}
parent 4358c70e
...@@ -186,7 +186,7 @@ WEBPImageDecoder::WEBPImageDecoder(AlphaOption alpha_option, ...@@ -186,7 +186,7 @@ WEBPImageDecoder::WEBPImageDecoder(AlphaOption alpha_option,
frame_background_has_alpha_(false), frame_background_has_alpha_(false),
demux_(nullptr), demux_(nullptr),
demux_state_(WEBP_DEMUX_PARSING_HEADER), demux_state_(WEBP_DEMUX_PARSING_HEADER),
have_already_parsed_this_data_(false), have_parsed_current_data_(false),
repetition_count_(kAnimationLoopOnce), repetition_count_(kAnimationLoopOnce),
decoded_height_(0) { decoded_height_(0) {
blend_function_ = (alpha_option == kAlphaPremultiplied) blend_function_ = (alpha_option == kAlphaPremultiplied)
...@@ -259,7 +259,7 @@ bool WEBPImageDecoder::CanAllowYUVDecodingForWebP() { ...@@ -259,7 +259,7 @@ bool WEBPImageDecoder::CanAllowYUVDecodingForWebP() {
} }
void WEBPImageDecoder::OnSetData(SegmentReader* data) { void WEBPImageDecoder::OnSetData(SegmentReader* data) {
have_already_parsed_this_data_ = false; have_parsed_current_data_ = false;
// TODO(crbug.com/943519): Modify this approach for incremental YUV (when // TODO(crbug.com/943519): Modify this approach for incremental YUV (when
// we don't require IsAllDataReceived() to be true before decoding). // we don't require IsAllDataReceived() to be true before decoding).
if (IsAllDataReceived()) { if (IsAllDataReceived()) {
...@@ -302,10 +302,9 @@ bool WEBPImageDecoder::UpdateDemuxer() { ...@@ -302,10 +302,9 @@ bool WEBPImageDecoder::UpdateDemuxer() {
if (data_->size() < kWebpHeaderSize) if (data_->size() < kWebpHeaderSize)
return IsAllDataReceived() ? SetFailed() : false; return IsAllDataReceived() ? SetFailed() : false;
if (have_already_parsed_this_data_) if (have_parsed_current_data_)
return true; return true;
have_parsed_current_data_ = true;
have_already_parsed_this_data_ = true;
if (consolidated_data_ && consolidated_data_->size() >= data_->size()) { if (consolidated_data_ && consolidated_data_->size() >= data_->size()) {
// Less data provided than last time. |consolidated_data_| is guaranteed // Less data provided than last time. |consolidated_data_| is guaranteed
......
...@@ -123,7 +123,7 @@ class PLATFORM_EXPORT WEBPImageDecoder final : public ImageDecoder { ...@@ -123,7 +123,7 @@ class PLATFORM_EXPORT WEBPImageDecoder final : public ImageDecoder {
WebPDemuxer* demux_; WebPDemuxer* demux_;
WebPDemuxState demux_state_; WebPDemuxState demux_state_;
bool have_already_parsed_this_data_; bool have_parsed_current_data_;
int repetition_count_; int repetition_count_;
int decoded_height_; int decoded_height_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment