summaryrefslogtreecommitdiffstats
path: root/remoting/client
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
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')
-rw-r--r--remoting/client/chromoting_client.cc15
-rw-r--r--remoting/client/chromoting_view.cc3
-rw-r--r--remoting/client/plugin/pepper_view.cc10
-rw-r--r--remoting/client/plugin/pepper_view_proxy.cc17
-rw-r--r--remoting/client/rectangle_update_decoder.cc43
5 files changed, 29 insertions, 59 deletions
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index 350efc1..ae581c8 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "jingle/glue/thread_wrapper.h"
-#include "remoting/base/tracer.h"
#include "remoting/client/chromoting_view.h"
#include "remoting/client/client_context.h"
#include "remoting/client/input_handler.h"
@@ -152,8 +151,6 @@ void ChromotingClient::DispatchPacket() {
const VideoPacket* packet = received_packets_.front().packet;
packet_being_processed_ = true;
- ScopedTracer tracer("Handle video packet");
-
// Measure the latency between the last packet being received and presented.
bool last_packet = (packet->flags() & VideoPacket::LAST_PACKET) != 0;
base::Time decode_start;
@@ -161,8 +158,8 @@ void ChromotingClient::DispatchPacket() {
decode_start = base::Time::Now();
rectangle_decoder_->DecodePacket(
- packet, NewTracedMethod(this, &ChromotingClient::OnPacketDone,
- last_packet, decode_start));
+ packet, NewRunnableMethod(this, &ChromotingClient::OnPacketDone,
+ last_packet, decode_start));
}
void ChromotingClient::OnConnectionOpened(protocol::ConnectionToHost* conn) {
@@ -204,13 +201,11 @@ void ChromotingClient::OnPacketDone(bool last_packet,
if (!message_loop()->BelongsToCurrentThread()) {
message_loop()->PostTask(
FROM_HERE,
- NewTracedMethod(this, &ChromotingClient::OnPacketDone,
+ NewRunnableMethod(this, &ChromotingClient::OnPacketDone,
last_packet, decode_start));
return;
}
- TraceContext::tracer()->PrintString("Packet done");
-
// Record the latency between the final packet being received and
// presented.
if (last_packet) {
@@ -232,12 +227,10 @@ void ChromotingClient::Initialize() {
if (!message_loop()->BelongsToCurrentThread()) {
message_loop()->PostTask(
FROM_HERE,
- NewTracedMethod(this, &ChromotingClient::Initialize));
+ NewRunnableMethod(this, &ChromotingClient::Initialize));
return;
}
- TraceContext::tracer()->PrintString("Initializing client.");
-
// Initialize the decoder.
rectangle_decoder_->Initialize(connection_->config());
diff --git a/remoting/client/chromoting_view.cc b/remoting/client/chromoting_view.cc
index e8b5f0f..23138d0 100644
--- a/remoting/client/chromoting_view.cc
+++ b/remoting/client/chromoting_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,6 @@
#include "base/message_loop.h"
#include "base/synchronization/waitable_event.h"
-#include "remoting/base/tracer.h"
namespace remoting {
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index b227402..8d5525f 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -11,7 +11,6 @@
#include "ppapi/cpp/point.h"
#include "ppapi/cpp/rect.h"
#include "ppapi/cpp/size.h"
-#include "remoting/base/tracer.h"
#include "remoting/base/util.h"
#include "remoting/client/chromoting_stats.h"
#include "remoting/client/client_context.h"
@@ -45,8 +44,6 @@ void PepperView::TearDown() {
void PepperView::Paint() {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
- TraceContext::tracer()->PrintString("Start Paint.");
-
if (is_static_fill_) {
LOG(INFO) << "Static filling " << static_fill_color_;
pp::ImageData image(instance_, pp::ImageData::GetNativeImageDataFormat(),
@@ -75,7 +72,6 @@ void PepperView::Paint() {
// that has the data here which can be redrawn.
return;
}
- TraceContext::tracer()->PrintString("End Paint.");
}
void PepperView::SetHostSize(const gfx::Size& host_size) {
@@ -94,8 +90,6 @@ void PepperView::SetHostSize(const gfx::Size& host_size) {
void PepperView::PaintFrame(media::VideoFrame* frame, UpdatedRects* rects) {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
- TraceContext::tracer()->PrintString("Start Paint Frame.");
-
SetHostSize(gfx::Size(frame->width(), frame->height()));
if (!backing_store_.get() || backing_store_->is_null()) {
@@ -112,8 +106,6 @@ void PepperView::PaintFrame(media::VideoFrame* frame, UpdatedRects* rects) {
if (changes_made)
FlushGraphics(start_time);
-
- TraceContext::tracer()->PrintString("End Paint Frame.");
}
bool PepperView::PaintRect(media::VideoFrame* frame, const gfx::Rect& r) {
@@ -325,7 +317,6 @@ void PepperView::OnPartialFrameOutput(media::VideoFrame* frame,
Task* done) {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
- TraceContext::tracer()->PrintString("Calling PaintFrame");
// TODO(ajwong): Clean up this API to be async so we don't need to use a
// member variable as a hack.
PaintFrame(frame, rects);
@@ -335,7 +326,6 @@ void PepperView::OnPartialFrameOutput(media::VideoFrame* frame,
void PepperView::OnPaintDone(base::Time paint_start) {
DCHECK(context_->main_message_loop()->BelongsToCurrentThread());
- TraceContext::tracer()->PrintString("Paint flushed");
instance_->GetStats()->video_paint_ms()->Record(
(base::Time::Now() - paint_start).InMilliseconds());
diff --git a/remoting/client/plugin/pepper_view_proxy.cc b/remoting/client/plugin/pepper_view_proxy.cc
index 6599f3c..3e4bb35 100644
--- a/remoting/client/plugin/pepper_view_proxy.cc
+++ b/remoting/client/plugin/pepper_view_proxy.cc
@@ -5,7 +5,6 @@
#include "remoting/client/plugin/pepper_view_proxy.h"
#include "base/message_loop.h"
-#include "remoting/base/tracer.h"
#include "remoting/client/client_context.h"
#include "remoting/client/plugin/chromoting_instance.h"
@@ -31,7 +30,7 @@ bool PepperViewProxy::Initialize() {
void PepperViewProxy::TearDown() {
if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) {
plugin_message_loop_->PostTask(
- FROM_HERE, NewTracedMethod(this, &PepperViewProxy::TearDown));
+ FROM_HERE, NewRunnableMethod(this, &PepperViewProxy::TearDown));
return;
}
@@ -42,7 +41,7 @@ void PepperViewProxy::TearDown() {
void PepperViewProxy::Paint() {
if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) {
plugin_message_loop_->PostTask(
- FROM_HERE, NewTracedMethod(this, &PepperViewProxy::Paint));
+ FROM_HERE, NewRunnableMethod(this, &PepperViewProxy::Paint));
return;
}
@@ -52,7 +51,7 @@ void PepperViewProxy::Paint() {
void PepperViewProxy::SetSolidFill(uint32 color) {
if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) {
- plugin_message_loop_->PostTask(FROM_HERE, NewTracedMethod(
+ plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
this, &PepperViewProxy::SetSolidFill, color));
return;
}
@@ -64,7 +63,7 @@ void PepperViewProxy::SetSolidFill(uint32 color) {
void PepperViewProxy::UnsetSolidFill() {
if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) {
plugin_message_loop_->PostTask(
- FROM_HERE, NewTracedMethod(this, &PepperViewProxy::UnsetSolidFill));
+ FROM_HERE, NewRunnableMethod(this, &PepperViewProxy::UnsetSolidFill));
return;
}
@@ -85,7 +84,7 @@ void PepperViewProxy::SetConnectionState(ConnectionState state) {
void PepperViewProxy::UpdateLoginStatus(bool success, const std::string& info) {
if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) {
- plugin_message_loop_->PostTask(FROM_HERE, NewTracedMethod(
+ plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
this, &PepperViewProxy::UpdateLoginStatus, success, info));
return;
}
@@ -123,7 +122,7 @@ void PepperViewProxy::AllocateFrame(
scoped_refptr<media::VideoFrame>* frame_out,
Task* done) {
if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) {
- plugin_message_loop_->PostTask(FROM_HERE, NewTracedMethod(
+ plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
this, &PepperViewProxy::AllocateFrame, format, width,
height, timestamp, duration, frame_out, done));
return;
@@ -137,7 +136,7 @@ void PepperViewProxy::AllocateFrame(
void PepperViewProxy::ReleaseFrame(media::VideoFrame* frame) {
if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) {
- plugin_message_loop_->PostTask(FROM_HERE, NewTracedMethod(
+ plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
this, &PepperViewProxy::ReleaseFrame, make_scoped_refptr(frame)));
return;
}
@@ -150,7 +149,7 @@ void PepperViewProxy::OnPartialFrameOutput(media::VideoFrame* frame,
UpdatedRects* rects,
Task* done) {
if (instance_ && !plugin_message_loop_->BelongsToCurrentThread()) {
- plugin_message_loop_->PostTask(FROM_HERE, NewTracedMethod(
+ plugin_message_loop_->PostTask(FROM_HERE, NewRunnableMethod(
this, &PepperViewProxy::OnPartialFrameOutput,
make_scoped_refptr(frame), rects, done));
return;
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;
}