summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ppapi/tests/test_graphics_2d.cc9
-rw-r--r--webkit/DEPS1
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_2d_impl.cc3
3 files changed, 9 insertions, 4 deletions
diff --git a/ppapi/tests/test_graphics_2d.cc b/ppapi/tests/test_graphics_2d.cc
index d0e3f20..f9bafc1 100644
--- a/ppapi/tests/test_graphics_2d.cc
+++ b/ppapi/tests/test_graphics_2d.cc
@@ -4,6 +4,7 @@
#include "ppapi/tests/test_graphics_2d.h"
+#include <stdlib.h>
#include <string.h>
#include "ppapi/c/dev/ppb_testing_dev.h"
@@ -293,18 +294,20 @@ std::string TestGraphics2D::TestInitToZero() {
std::string TestGraphics2D::TestDescribe() {
const int w = 15, h = 17;
- pp::Graphics2D dc(instance_, pp::Size(w, h), false);
+ const bool always_opaque = ::rand() % 2 ? true : false;
+ pp::Graphics2D dc(instance_, pp::Size(w, h), always_opaque);
if (dc.is_null())
return "Failure creating a boring device";
PP_Size size;
size.width = -1;
size.height = -1;
- PP_Bool is_always_opaque = PP_TRUE;
+ PP_Bool is_always_opaque = PP_FALSE;
if (!graphics_2d_interface_->Describe(dc.pp_resource(), &size,
&is_always_opaque))
return "Describe failed";
- if (size.width != w || size.height != h || is_always_opaque != PP_FALSE)
+ if (size.width != w || size.height != h ||
+ is_always_opaque != pp::BoolToPPBool(always_opaque))
return "Mismatch of data.";
PASS();
diff --git a/webkit/DEPS b/webkit/DEPS
index 6a2d299..66b7100 100644
--- a/webkit/DEPS
+++ b/webkit/DEPS
@@ -29,5 +29,6 @@ include_rules = [
"+net/test",
"+net/url_request",
"+net/websockets",
+ "+ppapi/cpp",
"+third_party/npapi/bindings",
]
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
index 5e98f44..1bb83ee 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
@@ -14,6 +14,7 @@
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/ppb_graphics_2d.h"
+#include "ppapi/cpp/common.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/blit.h"
#include "ui/gfx/point.h"
@@ -258,7 +259,7 @@ PP_Bool PPB_Graphics2D_Impl::Describe(PP_Size* size,
PP_Bool* is_always_opaque) {
size->width = image_data_->width();
size->height = image_data_->height();
- *is_always_opaque = PP_FALSE; // TODO(brettw) implement this.
+ *is_always_opaque = pp::BoolToPPBool(is_always_opaque_);
return PP_TRUE;
}