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

Side by Side Diff: ppapi/example/example.cc

Issue 9030001: Move paint aggregator and the completion callback factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix DEPS 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
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 <math.h> 5 #include <math.h>
6 #include <stdio.h> // FIXME(brettw) erase me. 6 #include <stdio.h> // FIXME(brettw) erase me.
7 #ifndef _WIN32 7 #ifndef _WIN32
8 #include <sys/time.h> 8 #include <sys/time.h>
9 #else 9 #else
10 #include <windows.h> 10 #include <windows.h>
(...skipping 13 matching lines...) Expand all
24 #include "ppapi/cpp/graphics_2d.h" 24 #include "ppapi/cpp/graphics_2d.h"
25 #include "ppapi/cpp/image_data.h" 25 #include "ppapi/cpp/image_data.h"
26 #include "ppapi/cpp/input_event.h" 26 #include "ppapi/cpp/input_event.h"
27 #include "ppapi/cpp/private/instance_private.h" 27 #include "ppapi/cpp/private/instance_private.h"
28 #include "ppapi/cpp/module.h" 28 #include "ppapi/cpp/module.h"
29 #include "ppapi/cpp/private/var_private.h" 29 #include "ppapi/cpp/private/var_private.h"
30 #include "ppapi/cpp/rect.h" 30 #include "ppapi/cpp/rect.h"
31 #include "ppapi/cpp/url_loader.h" 31 #include "ppapi/cpp/url_loader.h"
32 #include "ppapi/cpp/url_request_info.h" 32 #include "ppapi/cpp/url_request_info.h"
33 #include "ppapi/cpp/var.h" 33 #include "ppapi/cpp/var.h"
34 #include "ppapi/utility/completion_callback_factory.h"
34 35
35 static const int kStepsPerCircle = 800; 36 static const int kStepsPerCircle = 800;
36 37
37 void FlushCallback(void* data, int32_t result); 38 void FlushCallback(void* data, int32_t result);
38 39
39 void FillRect(pp::ImageData* image, int left, int top, int width, int height, 40 void FillRect(pp::ImageData* image, int left, int top, int width, int height,
40 uint32_t color) { 41 uint32_t color) {
41 for (int y = std::max(0, top); 42 for (int y = std::max(0, top);
42 y < std::min(image->size().height() - 1, top + height); 43 y < std::min(image->size().height() - 1, top + height);
43 y++) { 44 y++) {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 }; 500 };
500 501
501 namespace pp { 502 namespace pp {
502 503
503 // Factory function for your specialization of the Module object. 504 // Factory function for your specialization of the Module object.
504 Module* CreateModule() { 505 Module* CreateModule() {
505 return new MyModule(); 506 return new MyModule();
506 } 507 }
507 508
508 } // namespace pp 509 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698