Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Unified Diff: remoting/base/decoder_row_based.cc

Issue 9277001: Replace RectVectors with SkRegions in Decoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pick nits. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/base/decoder_row_based.h ('k') | remoting/base/decoder_vp8.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/decoder_row_based.cc
diff --git a/remoting/base/decoder_row_based.cc b/remoting/base/decoder_row_based.cc
index da65079ddaa7cc0287abee367b3b0dfbf2c2ad0a..d1b2cb6c61b7ca5ec551cfb43cc52baf4b4c5a2a 100644
--- a/remoting/base/decoder_row_based.cc
+++ b/remoting/base/decoder_row_based.cc
@@ -44,7 +44,7 @@ void DecoderRowBased::Reset() {
frame_ = NULL;
decompressor_->Reset();
state_ = kUninitialized;
- updated_rects_.clear();
+ updated_region_.setEmpty();
}
bool DecoderRowBased::IsReadyForData() {
@@ -128,7 +128,7 @@ Decoder::DecodeResult DecoderRowBased::DecodePacket(const VideoPacket* packet) {
return DECODE_ERROR;
}
- updated_rects_.push_back(clip_);
+ updated_region_.op(clip_, SkRegion::kUnion_Op);
decompressor_->Reset();
}
@@ -186,9 +186,9 @@ void DecoderRowBased::UpdateStateForPacket(const VideoPacket* packet) {
return;
}
-void DecoderRowBased::GetUpdatedRects(RectVector* rects) {
- rects->swap(updated_rects_);
- updated_rects_.clear();
+void DecoderRowBased::GetUpdatedRegion(SkRegion* region) {
+ region->swap(updated_region_);
+ updated_region_.setEmpty();
}
VideoPacketFormat::Encoding DecoderRowBased::Encoding() {
« no previous file with comments | « remoting/base/decoder_row_based.h ('k') | remoting/base/decoder_vp8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698