summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 23:56:05 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 23:56:05 +0000
commit3dfb004c33e51e281362f085089a01d2e71f7ec5 (patch)
tree2c6a5a3346f0d27c3a95ebb162c1688936e92168 /webkit/glue
parent78556d3fab3cf5fd324c8b17d2a660206d792e7b (diff)
downloadchromium_src-3dfb004c33e51e281362f085089a01d2e71f7ec5.zip
chromium_src-3dfb004c33e51e281362f085089a01d2e71f7ec5.tar.gz
chromium_src-3dfb004c33e51e281362f085089a01d2e71f7ec5.tar.bz2
Pull latest ppapi, update rect usage.
Review URL: http://codereview.chromium.org/1981010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/plugins/pepper_device_context_2d.cc12
-rw-r--r--webkit/glue/plugins/pepper_plugin_instance.cc6
2 files changed, 8 insertions, 10 deletions
diff --git a/webkit/glue/plugins/pepper_device_context_2d.cc b/webkit/glue/plugins/pepper_device_context_2d.cc
index 3fbc685..bd5cca3 100644
--- a/webkit/glue/plugins/pepper_device_context_2d.cc
+++ b/webkit/glue/plugins/pepper_device_context_2d.cc
@@ -106,18 +106,18 @@ void DeviceContext2D::PaintImageData(PP_Resource image,
// Draw the bitmap to the backing store.
SkIRect src_rect;
- if (dirty->left == 0 && dirty->top == 0 &&
- dirty->right == 0 && dirty->bottom == 0) {
+ if (dirty->point.x == 0 && dirty->point.y == 0 &&
+ dirty->size.width == 0 && dirty->size.height == 0) {
// Default to the entire bitmap.
src_rect.fLeft = 0;
src_rect.fTop = 0;
src_rect.fRight = new_image_bitmap.width();
src_rect.fBottom = new_image_bitmap.height();
} else {
- src_rect.fLeft = dirty->left;
- src_rect.fTop = dirty->top;
- src_rect.fRight = dirty->right;
- src_rect.fBottom = dirty->bottom;
+ src_rect.fLeft = dirty->point.x;
+ src_rect.fTop = dirty->point.y;
+ src_rect.fRight = dirty->point.x + dirty->size.width;
+ src_rect.fBottom = dirty->point.y + dirty->size.height;
}
SkRect dest_rect = { SkIntToScalar(src_rect.fLeft),
SkIntToScalar(src_rect.fTop),
diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc b/webkit/glue/plugins/pepper_plugin_instance.cc
index 17edef3..2de26be 100644
--- a/webkit/glue/plugins/pepper_plugin_instance.cc
+++ b/webkit/glue/plugins/pepper_plugin_instance.cc
@@ -25,10 +25,8 @@ namespace pepper {
namespace {
void RectToPPRect(const gfx::Rect& input, PP_Rect* output) {
- output->left = input.x();
- output->top = input.y();
- output->right = input.right();
- output->bottom = input.bottom();
+ *output = PP_MakeRectFromXYWH(input.x(), input.y(),
+ input.width(), input.height());
}
PP_Event_Type ConvertEventTypes(WebInputEvent::Type wetype) {