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

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

Issue 10801003: Propagate DPI information to web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer feedback. Created 8 years, 5 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/plugin/pepper_view.h ('k') | remoting/client/rectangle_update_decoder.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 35976e4efe2babacad8b22a0869d5cdc7030c10a..0d19b88e02ac57686f536bda245ce9ca09ba5824 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -77,6 +77,7 @@ PepperView::PepperView(ChromotingInstance* instance,
view_size_(SkISize::Make(0, 0)),
clip_area_(SkIRect::MakeEmpty()),
source_size_(SkISize::Make(0, 0)),
+ source_dpi_(SkIPoint::Make(0, 0)),
flush_pending_(false),
is_initialized_(false),
frame_received_(false) {
@@ -227,16 +228,18 @@ void PepperView::ReturnBuffer(pp::ImageData* buffer) {
}
}
-void PepperView::SetSourceSize(const SkISize& source_size) {
+void PepperView::SetSourceSize(const SkISize& source_size,
+ const SkIPoint& source_dpi) {
DCHECK(context_->main_task_runner()->BelongsToCurrentThread());
- if (source_size_ == source_size)
+ if (source_size_ == source_size && source_dpi_ == source_dpi)
return;
source_size_ = source_size;
+ source_dpi_ = source_dpi;
// Notify JavaScript of the change in source size.
- instance_->SetDesktopSize(source_size.width(), source_size.height());
+ instance_->SetDesktopSize(source_size, source_dpi);
}
pp::ImageData* PepperView::AllocateBuffer() {
« no previous file with comments | « remoting/client/plugin/pepper_view.h ('k') | remoting/client/rectangle_update_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698