Index: remoting/client/plugin/pepper_view.cc |
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc |
index 6bc45086792b43bac1e440ddae002ecfad470e1f..4450979de805e8f31476fbcc0667ee8b4a41366b 100644 |
--- a/remoting/client/plugin/pepper_view.cc |
+++ b/remoting/client/plugin/pepper_view.cc |
@@ -5,6 +5,7 @@ |
#include "remoting/client/plugin/pepper_view.h" |
#include "base/message_loop.h" |
+#include "base/string_util.h" |
#include "ppapi/cpp/graphics_2d.h" |
#include "ppapi/cpp/image_data.h" |
#include "ppapi/cpp/point.h" |
@@ -47,13 +48,15 @@ void PepperView::Paint() { |
// TODO(ajwong): We're assuming the native format is BGRA_PREMUL below. This |
// is wrong. |
if (is_static_fill_) { |
- LOG(ERROR) << "Static filling " << static_fill_color_; |
+ instance_->LogDebugError( |
+ StringPrintf("Static filling %08x", static_fill_color_)); |
pp::ImageData image(instance_, pp::ImageData::GetNativeImageDataFormat(), |
pp::Size(viewport_width_, viewport_height_), |
false); |
if (image.is_null()) { |
- LOG(ERROR) << "Unable to allocate image of size: " |
- << viewport_width_ << "x" << viewport_height_; |
+ instance_->LogDebugError( |
+ StringPrintf("Unable to allocate image of size: %dx%d", |
+ viewport_width_, viewport_height_)); |
return; |
} |
@@ -100,8 +103,9 @@ void PepperView::PaintFrame(media::VideoFrame* frame, UpdatedRects* rects) { |
pp::Size(r.width(), r.height()), |
false); |
if (image.is_null()) { |
- LOG(ERROR) << "Unable to allocate image of size: " |
- << r.width() << "x" << r.height(); |
+ instance_->LogDebugError( |
+ StringPrintf("Unable to allocate image of size: %dx%d", |
+ r.width(), r.height())); |
return; |
} |
@@ -188,7 +192,7 @@ void PepperView::SetViewport(int x, int y, int width, int height) { |
pp::Size(viewport_width_, viewport_height_), |
false); |
if (!instance_->BindGraphics(graphics2d_)) { |
- LOG(ERROR) << "Couldn't bind the device context."; |
+ instance_->LogDebugError("Couldn't bind the device context."); |
return; |
} |
@@ -221,7 +225,7 @@ void PepperView::ReleaseFrame(media::VideoFrame* frame) { |
DCHECK(instance_->CurrentlyOnPluginThread()); |
if (frame) { |
- LOG(WARNING) << "Frame released."; |
+ instance_->LogDebugError("Frame released."); |
frame->Release(); |
} |
} |