summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorneb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-22 20:05:04 +0000
committerneb@chromium.org <neb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-22 20:05:04 +0000
commit80d1a8c2443c3dc71de5f94f4ca5e7f3a9f6b052 (patch)
tree4e3f80f6dc65a16c8b1833d3e9c20380ae738548 /ppapi
parent911a7b03501447ddd214fe19ee64f89e89b7d59e (diff)
downloadchromium_src-80d1a8c2443c3dc71de5f94f4ca5e7f3a9f6b052.zip
chromium_src-80d1a8c2443c3dc71de5f94f4ca5e7f3a9f6b052.tar.gz
chromium_src-80d1a8c2443c3dc71de5f94f4ca5e7f3a9f6b052.tar.bz2
Unbreak compilation of ppapi examples.
BUG=none TEST=Examples from ppapi/examples compile. Review URL: http://codereview.chromium.org/6676072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79025 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/examples/2d/paint_manager_example.cc10
-rw-r--r--ppapi/examples/2d/scroll.cc6
-rw-r--r--ppapi/examples/font/simple_font.cc10
3 files changed, 13 insertions, 13 deletions
diff --git a/ppapi/examples/2d/paint_manager_example.cc b/ppapi/examples/2d/paint_manager_example.cc
index 5d2bb22..e9b034e 100644
--- a/ppapi/examples/2d/paint_manager_example.cc
+++ b/ppapi/examples/2d/paint_manager_example.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -43,7 +43,7 @@ class MyInstance : public pp::Instance, public pp::PaintManager::Client {
paint_manager_.Initialize(this, this, false);
}
- virtual bool HandleEvent(const PP_InputEvent& event) {
+ virtual bool HandleInputEvent(const PP_InputEvent& event) {
switch (event.type) {
case PP_INPUTEVENT_TYPE_MOUSEDOWN: {
const PP_InputEvent_Mouse& mouse_event = event.u.mouse;
@@ -68,19 +68,19 @@ class MyInstance : public pp::Instance, public pp::PaintManager::Client {
}
}
- virtual void ViewChanged(const pp::Rect& position, const pp::Rect& clip) {
+ virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip) {
paint_manager_.SetSize(position.size());
}
// PaintManager::Client implementation.
- virtual bool OnPaint(pp::Graphics2D& device,
+ virtual bool OnPaint(pp::Graphics2D&,
const std::vector<pp::Rect>& paint_rects,
const pp::Rect& paint_bounds) {
// Make an image just large enough to hold all dirty rects. We won't
// actually paint all of these pixels below, but rather just the dirty
// ones. Since image allocation can be somewhat heavyweight, we wouldn't
// want to allocate separate images in the case of multiple dirty rects.
- pp::ImageData updated_image(PP_IMAGEDATAFORMAT_BGRA_PREMUL,
+ pp::ImageData updated_image(this, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
paint_bounds.size(), false);
// We could repaint everything inside the image we made above. For this
diff --git a/ppapi/examples/2d/scroll.cc b/ppapi/examples/2d/scroll.cc
index b570ae1..e158eac 100644
--- a/ppapi/examples/2d/scroll.cc
+++ b/ppapi/examples/2d/scroll.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -40,7 +40,7 @@ class MyInstance : public pp::Instance, public pp::PaintManager::Client {
paint_manager_.Initialize(this, this, false);
}
- virtual void ViewChanged(const pp::Rect& position, const pp::Rect& clip) {
+ virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip) {
paint_manager_.SetSize(position.size());
}
@@ -71,7 +71,7 @@ class MyInstance : public pp::Instance, public pp::PaintManager::Client {
}
// Paint the background.
- pp::ImageData updated_image(PP_IMAGEDATAFORMAT_BGRA_PREMUL,
+ pp::ImageData updated_image(this, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
paint_bounds.size(), false);
FillRect(&updated_image, pp::Rect(updated_image.size()), 0xFF8888FF);
diff --git a/ppapi/examples/font/simple_font.cc b/ppapi/examples/font/simple_font.cc
index 26c8c2d..c1bfdef 100644
--- a/ppapi/examples/font/simple_font.cc
+++ b/ppapi/examples/font/simple_font.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -20,19 +20,19 @@ class MyInstance : public pp::Instance {
: pp::Instance(instance) {
}
- virtual void ViewChanged(const pp::Rect& position, const pp::Rect& clip) {
+ virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip) {
if (position.size() == last_size_)
return;
last_size_ = position.size();
- pp::ImageData image(PP_IMAGEDATAFORMAT_BGRA_PREMUL, last_size_, true);
- pp::Graphics2D device(last_size_, false);
+ pp::ImageData image(this, PP_IMAGEDATAFORMAT_BGRA_PREMUL, last_size_, true);
+ pp::Graphics2D device(this, last_size_, false);
BindGraphics(device);
pp::FontDescription_Dev desc;
desc.set_family(PP_FONTFAMILY_SANSSERIF);
desc.set_size(30);
- pp::Font_Dev font(desc);
+ pp::Font_Dev font(this, desc);
pp::Rect text_clip(position.size()); // Use entire bounds for clip.
font.DrawTextAt(&image,