summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl
diff options
context:
space:
mode:
authorjhorwich@chromium.org <jhorwich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 19:33:33 +0000
committerjhorwich@chromium.org <jhorwich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-28 19:33:33 +0000
commit0cd5b9dfd0882bcb8ecf70a4b135e8d79113d28a (patch)
tree4f52f8e8297c613550899b6685dcba9718f103c8 /ppapi/shared_impl
parent65828ab68c586b3074e8705644f7d93b54bac418 (diff)
downloadchromium_src-0cd5b9dfd0882bcb8ecf70a4b135e8d79113d28a.zip
chromium_src-0cd5b9dfd0882bcb8ecf70a4b135e8d79113d28a.tar.gz
chromium_src-0cd5b9dfd0882bcb8ecf70a4b135e8d79113d28a.tar.bz2
Implement HiDPI support in Pepper dev interface
This patch requires WebKit patch https://bugs.webkit.org/show_bug.cgi?id=87874 (WebKit r121364) Expose device_scale_factor and css_scale_factor to Pepper plugins via a dev interface on View resource. Allow Pepper plugins to create a 2D graphics context with a scale factor so the plugins can render at device resolution rather than DIPs if they want. BUG=114673 TEST=browser_tests --gtest_filter="PPAPITest.*" TEST=browser_tests --gtest_filter="OutOfProcessPPAPITest.*" TEST=Build, run existing PPAPI plugin at 2x scale TEST=Build, run test HiDPI aware plugin to render at device rez, at 1x, 2x scale Review URL: https://chromiumcodereview.appspot.com/10544168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r--ppapi/shared_impl/ppb_view_shared.cc4
-rw-r--r--ppapi/shared_impl/ppb_view_shared.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/ppapi/shared_impl/ppb_view_shared.cc b/ppapi/shared_impl/ppb_view_shared.cc
index 1e024a6..54659a3 100644
--- a/ppapi/shared_impl/ppb_view_shared.cc
+++ b/ppapi/shared_impl/ppb_view_shared.cc
@@ -24,7 +24,9 @@ bool ViewData::Equals(const ViewData& other) const {
clip_rect.point.x == other.clip_rect.point.x &&
clip_rect.point.y == other.clip_rect.point.y &&
clip_rect.size.width == other.clip_rect.size.width &&
- clip_rect.size.height == other.clip_rect.size.height;
+ clip_rect.size.height == other.clip_rect.size.height &&
+ device_scale == other.device_scale &&
+ css_scale == other.css_scale;
}
PPB_View_Shared::PPB_View_Shared(ResourceObjectType type,
diff --git a/ppapi/shared_impl/ppb_view_shared.h b/ppapi/shared_impl/ppb_view_shared.h
index 59b8e72..e3d41ac 100644
--- a/ppapi/shared_impl/ppb_view_shared.h
+++ b/ppapi/shared_impl/ppb_view_shared.h
@@ -25,6 +25,8 @@ struct PPAPI_SHARED_EXPORT ViewData {
bool is_fullscreen;
bool is_page_visible;
PP_Rect clip_rect;
+ float device_scale;
+ float css_scale;
};
class PPAPI_SHARED_EXPORT PPB_View_Shared