summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 17:20:53 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 17:20:53 +0000
commit9002d6cd1f2c03af2c017dfdd8ab522e1be7d912 (patch)
tree1e374bd89a7f51638eea82d88308f941d5fb7d61 /webkit
parent03e220f75621e6773f0a4bb13d0c59f03035bbaa (diff)
downloadchromium_src-9002d6cd1f2c03af2c017dfdd8ab522e1be7d912.zip
chromium_src-9002d6cd1f2c03af2c017dfdd8ab522e1be7d912.tar.gz
chromium_src-9002d6cd1f2c03af2c017dfdd8ab522e1be7d912.tar.bz2
Pull latest ppapi, update rect usage.
This is an unrevert of r46879 which reverted my previous 46876. It includes the fix for the Windows build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-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) {