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

Side by Side Diff: ppapi/examples/2d/paint_manager_example.cc

Issue 9122012: gcl change rev (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/example/example.cc ('k') | ppapi/examples/2d/scroll.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/c/pp_input_event.h" 5 #include "ppapi/c/pp_input_event.h"
6 #include "ppapi/cpp/graphics_2d.h" 6 #include "ppapi/cpp/graphics_2d.h"
7 #include "ppapi/cpp/image_data.h" 7 #include "ppapi/cpp/image_data.h"
8 #include "ppapi/cpp/input_event.h" 8 #include "ppapi/cpp/input_event.h"
9 #include "ppapi/cpp/instance.h" 9 #include "ppapi/cpp/instance.h"
10 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
11 #include "ppapi/cpp/paint_manager.h"
12 #include "ppapi/cpp/size.h" 11 #include "ppapi/cpp/size.h"
12 #include "ppapi/utility/graphics/paint_manager.h"
13 13
14 // Number of pixels to each side of the center of the square that we draw. 14 // Number of pixels to each side of the center of the square that we draw.
15 static const int kSquareRadius = 2; 15 static const int kSquareRadius = 2;
16 16
17 // We identify our square by the center point. This computes the rect for the 17 // We identify our square by the center point. This computes the rect for the
18 // square given that point. 18 // square given that point.
19 pp::Rect SquareForPoint(int x, int y) { 19 pp::Rect SquareForPoint(int x, int y) {
20 return PP_MakeRectFromXYWH(x - kSquareRadius, y - kSquareRadius, 20 return PP_MakeRectFromXYWH(x - kSquareRadius, y - kSquareRadius,
21 kSquareRadius * 2 + 1, kSquareRadius * 2 + 1); 21 kSquareRadius * 2 + 1, kSquareRadius * 2 + 1);
22 } 22 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 }; 151 };
152 152
153 namespace pp { 153 namespace pp {
154 154
155 // Factory function for your specialization of the Module object. 155 // Factory function for your specialization of the Module object.
156 Module* CreateModule() { 156 Module* CreateModule() {
157 return new MyModule(); 157 return new MyModule();
158 } 158 }
159 159
160 } // namespace pp 160 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/example/example.cc ('k') | ppapi/examples/2d/scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698