summaryrefslogtreecommitdiffstats
path: root/ppapi/examples/2d
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 21:32:39 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 21:32:39 +0000
commit8f4f81fe13308b4820e70a6899f0d70e03c4ead6 (patch)
tree658a3e4690b36511582bb8dc11f93652bddde74a /ppapi/examples/2d
parent701d7d6c743985431d1aab03da77669d09d1886d (diff)
downloadchromium_src-8f4f81fe13308b4820e70a6899f0d70e03c4ead6.zip
chromium_src-8f4f81fe13308b4820e70a6899f0d70e03c4ead6.tar.gz
chromium_src-8f4f81fe13308b4820e70a6899f0d70e03c4ead6.tar.bz2
Revert the changes to the paint manager example.
This was supposed to be removed from my previous CL before checkin but I forgot. BUG=142507 Review URL: https://chromiumcodereview.appspot.com/10874024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153295 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/examples/2d')
-rw-r--r--ppapi/examples/2d/paint_manager_example.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/ppapi/examples/2d/paint_manager_example.cc b/ppapi/examples/2d/paint_manager_example.cc
index 430f422..86bdbe7 100644
--- a/ppapi/examples/2d/paint_manager_example.cc
+++ b/ppapi/examples/2d/paint_manager_example.cc
@@ -78,9 +78,7 @@ class MyInstance : public pp::Instance, public pp::PaintManager::Client {
// PaintManager::Client implementation.
virtual bool OnPaint(pp::Graphics2D& graphics_2d,
const std::vector<pp::Rect>& paint_rects,
- const pp::Rect& paint_bounds_unused) {
- pp::Rect paint_bounds(paint_manager_.GetEffectiveSize());
-
+ 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
@@ -98,7 +96,6 @@ class MyInstance : public pp::Instance, public pp::PaintManager::Client {
// Note that the aggregator used by the paint manager won't give us
// multiple regions that overlap, so we don't have to worry about double
// painting in this code.
-/*
for (size_t i = 0; i < paint_rects.size(); i++) {
// Since our image is just the invalid region, we need to offset the
// areas we paint by that much. This is just a light blue background.
@@ -109,7 +106,6 @@ class MyInstance : public pp::Instance, public pp::PaintManager::Client {
paint_rects[i].height(),
0xFFAAAAFF);
}
- */
// Paint the square black. Because we're lazy, we do this outside of the
// loop above.
@@ -121,7 +117,7 @@ class MyInstance : public pp::Instance, public pp::PaintManager::Client {
square.height(),
0xFF000000);
- graphics_2d.ReplaceContents(&updated_image);
+ graphics_2d.PaintImageData(updated_image, paint_bounds.point());
return true;
}