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

Unified Diff: remoting/client/rectangle_update_decoder.cc

Issue 3305001: Move decoder into separate thread, clean up API layering, and redo update protocl (Closed)
Patch Set: Fix compile error. Created 10 years, 2 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/client/rectangle_update_decoder.h ('k') | remoting/client/x11_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/rectangle_update_decoder.cc
diff --git a/remoting/client/rectangle_update_decoder.cc b/remoting/client/rectangle_update_decoder.cc
index 9d34e2a8e663b76db689c7287dc5ad62d1f057b1..44bac0844e41a939ae338dfc71eb864078b7d252 100644
--- a/remoting/client/rectangle_update_decoder.cc
+++ b/remoting/client/rectangle_update_decoder.cc
@@ -8,9 +8,9 @@
#include "base/message_loop.h"
#include "media/base/callback.h"
#include "remoting/base/decoder.h"
-#include "remoting/base/decoder_verbatim.h"
-#include "remoting/base/decoder_zlib.h"
+#include "remoting/base/decoder_row_based.h"
#include "remoting/base/protocol/chromotocol.pb.h"
+#include "remoting/base/protocol_util.h"
#include "remoting/base/tracer.h"
#include "remoting/client/frame_consumer.h"
@@ -195,10 +195,10 @@ void RectangleUpdateDecoder::InitializeDecoder(const RectangleFormat& format,
// Initialize a new decoder based on this message encoding.
if (format.encoding() == EncodingNone) {
TraceContext::tracer()->PrintString("Creating Verbatim decoder.");
- decoder_.reset(new DecoderVerbatim());
+ decoder_.reset(DecoderRowBased::CreateVerbatimDecoder());
} else if (format.encoding() == EncodingZlib) {
TraceContext::tracer()->PrintString("Creating Zlib decoder");
- decoder_.reset(new DecoderZlib());
+ decoder_.reset(DecoderRowBased::CreateZlibDecoder());
} else {
NOTREACHED() << "Invalid Encoding found: " << format.encoding();
}
@@ -211,7 +211,8 @@ void RectangleUpdateDecoder::InitializeDecoder(const RectangleFormat& format,
gfx::Rect rectangle_size(format.x(), format.y(),
format.width(), format.height());
updated_rects_.push_back(rectangle_size);
- decoder_->Initialize(frame_, rectangle_size);
+ decoder_->Initialize(frame_, rectangle_size,
+ GetBytesPerPixel(format.pixel_format()));
TraceContext::tracer()->PrintString("Decoder is Initialized");
}
« no previous file with comments | « remoting/client/rectangle_update_decoder.h ('k') | remoting/client/x11_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698