Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: ppapi/examples/2d/paint_manager_example.cc

Issue 6676072: Unbreak compilation of ppapi examples. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed virtual functions. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/examples/2d/scroll.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/2d/paint_manager_example.cc
diff --git a/ppapi/examples/2d/paint_manager_example.cc b/ppapi/examples/2d/paint_manager_example.cc
index 5d2bb22ee152b09d83db5c2e02b19e7b8a5e7d4d..3e886a36c4f9f786d5bf5c6cb129c209d07b50b6 100644
--- a/ppapi/examples/2d/paint_manager_example.cc
+++ b/ppapi/examples/2d/paint_manager_example.cc
@@ -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
« no previous file with comments | « no previous file | ppapi/examples/2d/scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698