summaryrefslogtreecommitdiffstats
path: root/remoting/client/rectangle_update_decoder.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-12 22:42:32 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-12 22:42:32 +0000
commitca8e7b847d359c8841f09f7ea43e2b5cc7dabf13 (patch)
tree5e73315ac0db059e8976cb07a00814de27d5568c /remoting/client/rectangle_update_decoder.cc
parentfe327e615bd6ffc0272b4a1cba774c1e1d16c2e6 (diff)
downloadchromium_src-ca8e7b847d359c8841f09f7ea43e2b5cc7dabf13.zip
chromium_src-ca8e7b847d359c8841f09f7ea43e2b5cc7dabf13.tar.gz
chromium_src-ca8e7b847d359c8841f09f7ea43e2b5cc7dabf13.tar.bz2
Remove all the experimental Traced Task code from remoting.
This code is obsolete and never fully functioned anyways. Deleting. BUG=57373,65680,73744 TEST=valgrind Review URL: http://codereview.chromium.org/7780019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/rectangle_update_decoder.cc')
-rw-r--r--remoting/client/rectangle_update_decoder.cc43
1 files changed, 16 insertions, 27 deletions
diff --git a/remoting/client/rectangle_update_decoder.cc b/remoting/client/rectangle_update_decoder.cc
index c6426a8..b96b7ba 100644
--- a/remoting/client/rectangle_update_decoder.cc
+++ b/remoting/client/rectangle_update_decoder.cc
@@ -9,7 +9,6 @@
#include "remoting/base/decoder.h"
#include "remoting/base/decoder_row_based.h"
#include "remoting/base/decoder_vp8.h"
-#include "remoting/base/tracer.h"
#include "remoting/base/util.h"
#include "remoting/client/frame_consumer.h"
#include "remoting/protocol/session_config.h"
@@ -59,13 +58,10 @@ void RectangleUpdateDecoder::Initialize(const SessionConfig& config) {
// Initialize decoder based on the selected codec.
ChannelConfig::Codec codec = config.video_config().codec;
if (codec == ChannelConfig::CODEC_VERBATIM) {
- TraceContext::tracer()->PrintString("Creating Verbatim decoder.");
decoder_.reset(DecoderRowBased::CreateVerbatimDecoder());
} else if (codec == ChannelConfig::CODEC_ZIP) {
- TraceContext::tracer()->PrintString("Creating Zlib decoder");
decoder_.reset(DecoderRowBased::CreateZlibDecoder());
} else if (codec == ChannelConfig::CODEC_VP8) {
- TraceContext::tracer()->PrintString("Creating VP8 decoder");
decoder_.reset(new DecoderVp8());
} else {
NOTREACHED() << "Invalid Encoding found: " << codec;
@@ -77,15 +73,13 @@ void RectangleUpdateDecoder::DecodePacket(const VideoPacket* packet,
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(
FROM_HERE,
- NewTracedMethod(this,
- &RectangleUpdateDecoder::DecodePacket, packet,
- done));
+ NewRunnableMethod(this,
+ &RectangleUpdateDecoder::DecodePacket, packet,
+ done));
return;
}
base::ScopedTaskRunner done_runner(done);
- TraceContext::tracer()->PrintString("Decode Packet called.");
-
AllocateFrame(packet, done_runner.Release());
}
@@ -94,14 +88,13 @@ void RectangleUpdateDecoder::AllocateFrame(const VideoPacket* packet,
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(
FROM_HERE,
- NewTracedMethod(this,
- &RectangleUpdateDecoder::AllocateFrame, packet, done));
+ NewRunnableMethod(
+ this,
+ &RectangleUpdateDecoder::AllocateFrame, packet, done));
return;
}
base::ScopedTaskRunner done_runner(done);
- TraceContext::tracer()->PrintString("AllocateFrame called.");
-
// Find the required frame size.
bool has_screen_size = packet->format().has_screen_width() &&
packet->format().has_screen_height();
@@ -119,11 +112,9 @@ void RectangleUpdateDecoder::AllocateFrame(const VideoPacket* packet,
// Allocate a new frame, if necessary.
if ((!frame_) || (has_screen_size && (screen_size != frame_size))) {
if (frame_) {
- TraceContext::tracer()->PrintString("Releasing old frame.");
consumer_->ReleaseFrame(frame_);
frame_ = NULL;
}
- TraceContext::tracer()->PrintString("Requesting new frame.");
consumer_->AllocateFrame(media::VideoFrame::RGB32,
screen_size.width(), screen_size.height(),
@@ -143,9 +134,9 @@ void RectangleUpdateDecoder::ProcessPacketData(
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(
FROM_HERE,
- NewTracedMethod(this,
- &RectangleUpdateDecoder::ProcessPacketData, packet,
- done));
+ NewRunnableMethod(this,
+ &RectangleUpdateDecoder::ProcessPacketData, packet,
+ done));
return;
}
base::ScopedTaskRunner done_runner(done);
@@ -162,8 +153,6 @@ void RectangleUpdateDecoder::ProcessPacketData(
return;
}
- TraceContext::tracer()->PrintString("Executing Decode.");
-
if (decoder_->DecodePacket(packet) == Decoder::DECODE_DONE)
SubmitToConsumer();
}
@@ -173,10 +162,10 @@ void RectangleUpdateDecoder::SetScaleRatios(double horizontal_ratio,
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(
FROM_HERE,
- NewTracedMethod(this,
- &RectangleUpdateDecoder::SetScaleRatios,
- horizontal_ratio,
- vertical_ratio));
+ NewRunnableMethod(this,
+ &RectangleUpdateDecoder::SetScaleRatios,
+ horizontal_ratio,
+ vertical_ratio));
return;
}
@@ -190,7 +179,7 @@ void RectangleUpdateDecoder::UpdateClipRect(const gfx::Rect& new_clip_rect) {
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(
FROM_HERE,
- NewTracedMethod(
+ NewRunnableMethod(
this,
&RectangleUpdateDecoder::UpdateClipRect, new_clip_rect));
return;
@@ -241,7 +230,7 @@ void RectangleUpdateDecoder::RefreshFullFrame() {
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(
FROM_HERE,
- NewTracedMethod(this, &RectangleUpdateDecoder::RefreshFullFrame));
+ NewRunnableMethod(this, &RectangleUpdateDecoder::RefreshFullFrame));
return;
}
@@ -286,7 +275,7 @@ void RectangleUpdateDecoder::OnFrameConsumed() {
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(
FROM_HERE,
- NewTracedMethod(this, &RectangleUpdateDecoder::OnFrameConsumed));
+ NewRunnableMethod(this, &RectangleUpdateDecoder::OnFrameConsumed));
return;
}