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

Unified Diff: remoting/client/plugin/pepper_view.cc

Issue 8985007: Refactoring of the client-side input pipeline and scaling dimension management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include SkTypes.h before SkSize.h to fix win build. Created 9 years 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/plugin/pepper_view.h ('k') | remoting/client/plugin/pepper_view_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_view.cc
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index ec292902130bcd6f6bfbc4560d96b3e3f715600a..d8a776c8b31f26d08462bb48d3375f5507527c94 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -262,12 +262,12 @@ void PepperView::SetConnectionState(protocol::ConnectionToHost::State state,
}
}
-bool PepperView::SetPluginSize(const SkISize& plugin_size) {
- if (plugin_size_ == plugin_size)
+bool PepperView::SetViewSize(const SkISize& view_size) {
+ if (view_size_ == view_size)
return false;
- plugin_size_ = plugin_size;
+ view_size_ = view_size;
- pp::Size pp_size = pp::Size(plugin_size.width(), plugin_size.height());
+ pp::Size pp_size = pp::Size(view_size.width(), view_size.height());
graphics2d_ = pp::Graphics2D(instance_, pp_size, true);
if (!instance_->BindGraphics(graphics2d_)) {
@@ -275,14 +275,14 @@ bool PepperView::SetPluginSize(const SkISize& plugin_size) {
return false;
}
- if (plugin_size.isEmpty())
+ if (view_size.isEmpty())
return false;
// Allocate the backing store to save the desktop image.
if ((backing_store_.get() == NULL) ||
(backing_store_->size() != pp_size)) {
VLOG(1) << "Allocate backing store: "
- << plugin_size.width() << " x " << plugin_size.height();
+ << view_size.width() << " x " << view_size.height();
backing_store_.reset(
new pp::ImageData(instance_, pp::ImageData::GetNativeImageDataFormat(),
pp_size, false));
@@ -292,22 +292,6 @@ bool PepperView::SetPluginSize(const SkISize& plugin_size) {
return true;
}
-double PepperView::GetHorizontalScaleRatio() const {
- if (instance_->DoScaling()) {
- DCHECK(!host_size_.isEmpty());
- return 1.0 * plugin_size_.width() / host_size_.width();
- }
- return 1.0;
-}
-
-double PepperView::GetVerticalScaleRatio() const {
- if (instance_->DoScaling()) {
- DCHECK(!host_size_.isEmpty());
- return 1.0 * plugin_size_.height() / host_size_.height();
- }
- return 1.0;
-}
-
void PepperView::AllocateFrame(media::VideoFrame::Format format,
const SkISize& size,
scoped_refptr<media::VideoFrame>* frame_out,
« no previous file with comments | « remoting/client/plugin/pepper_view.h ('k') | remoting/client/plugin/pepper_view_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698