summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/dev/graphics_2d_dev.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 21:47:38 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-22 21:47:38 +0000
commita0217c5e843358d5dd596bede0fd31c8ff843b14 (patch)
tree1185b8ff2052d1616762908c7a15cab0e74a8572 /ppapi/cpp/dev/graphics_2d_dev.h
parentd0de222385e1f6d262ef880dfb010fa4d70ff2df (diff)
downloadchromium_src-a0217c5e843358d5dd596bede0fd31c8ff843b14.zip
chromium_src-a0217c5e843358d5dd596bede0fd31c8ff843b14.tar.gz
chromium_src-a0217c5e843358d5dd596bede0fd31c8ff843b14.tar.bz2
Add a query function for the scaling feature.
We need to be able to query whether scaling is supported before creating a Graphics2D object so we know which code path to use. This just adds a function to do that checking. I also renamed Graphics2DDev to Graphics2D_Dev for consistency with the other Dev wrapper objects. TEST=none BUG=none Review URL: https://chromiumcodereview.appspot.com/10832428 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/dev/graphics_2d_dev.h')
-rw-r--r--ppapi/cpp/dev/graphics_2d_dev.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/ppapi/cpp/dev/graphics_2d_dev.h b/ppapi/cpp/dev/graphics_2d_dev.h
index 2ebc06e..3dc8c71 100644
--- a/ppapi/cpp/dev/graphics_2d_dev.h
+++ b/ppapi/cpp/dev/graphics_2d_dev.h
@@ -11,17 +11,20 @@ namespace pp {
// Graphics2DDev is a version of Graphics2D that exposes under-development APIs
// for HiDPI
-class Graphics2DDev : public Graphics2D {
+class Graphics2D_Dev : public Graphics2D {
public:
/// Default constructor for creating an is_null()
- /// <code>Graphics2DDev</code> object.
- Graphics2DDev() : Graphics2D() {}
+ /// <code>Graphics2D_Dev</code> object.
+ Graphics2D_Dev() : Graphics2D() {}
// Constructor for creating a <code>Graphics2DDev</code> object from an
// existing <code>Graphics2D</code> object.
- Graphics2DDev(const Graphics2D& other) : Graphics2D(other) {}
+ Graphics2D_Dev(const Graphics2D& other) : Graphics2D(other) {}
- virtual ~Graphics2DDev() {}
+ virtual ~Graphics2D_Dev() {}
+
+ /// Returns true if SetScale and GetScale are supported. False if not.
+ static bool SupportsScale();
/// SetScale() sets the scale factor that will be applied when painting the
/// graphics context onto the output device. Typically, if rendering at device