| OLD | NEW |
| 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/native_client/tests/ppapi_test_lib/test_interface.h" | 5 #include "ppapi/native_client/tests/ppapi_test_lib/test_interface.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <new> | 9 #include <new> |
| 10 | 10 |
| 11 #include "base/macros.h" |
| 11 #include "native_client/src/include/nacl_macros.h" | 12 #include "native_client/src/include/nacl_macros.h" |
| 12 #include "native_client/src/shared/platform/nacl_check.h" | 13 #include "native_client/src/shared/platform/nacl_check.h" |
| 13 | 14 |
| 14 #include "ppapi/c/pp_instance.h" | 15 #include "ppapi/c/pp_instance.h" |
| 15 #include "ppapi/c/pp_module.h" | 16 #include "ppapi/c/pp_module.h" |
| 17 #include "ppapi/c/pp_rect.h" |
| 16 #include "ppapi/c/pp_size.h" | 18 #include "ppapi/c/pp_size.h" |
| 17 #include "ppapi/c/pp_rect.h" | |
| 18 #include "ppapi/c/pp_var.h" | 19 #include "ppapi/c/pp_var.h" |
| 19 #include "ppapi/c/ppb_core.h" | 20 #include "ppapi/c/ppb_core.h" |
| 20 #include "ppapi/c/ppb_graphics_2d.h" | 21 #include "ppapi/c/ppb_graphics_2d.h" |
| 21 #include "ppapi/c/ppb_image_data.h" | 22 #include "ppapi/c/ppb_image_data.h" |
| 22 #include "ppapi/c/ppb_instance.h" | 23 #include "ppapi/c/ppb_instance.h" |
| 23 #include "ppapi/c/ppb_messaging.h" | 24 #include "ppapi/c/ppb_messaging.h" |
| 24 #include "ppapi/c/ppb_var.h" | 25 #include "ppapi/c/ppb_var.h" |
| 25 #include "ppapi/c/private/ppb_testing_private.h" | 26 #include "ppapi/c/private/ppb_testing_private.h" |
| 26 | 27 |
| 27 #include "ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h" | 28 #include "ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 for (int y = origin.y; y < origin.y + size.height && !found_error; y++) { | 231 for (int y = origin.y; y < origin.y + size.height && !found_error; y++) { |
| 231 for (int x = origin.x; x < origin.x + size.width && !found_error; x++) { | 232 for (int x = origin.x; x < origin.x + size.width && !found_error; x++) { |
| 232 uint32_t pixel_color = static_cast<uint32_t*>(bitmap)[stride * y + x]; | 233 uint32_t pixel_color = static_cast<uint32_t*>(bitmap)[stride * y + x]; |
| 233 found_error = (pixel_color != expected_color); | 234 found_error = (pixel_color != expected_color); |
| 234 } | 235 } |
| 235 } | 236 } |
| 236 | 237 |
| 237 PPBCore()->ReleaseResource(image); | 238 PPBCore()->ReleaseResource(image); |
| 238 return !found_error; | 239 return !found_error; |
| 239 } | 240 } |
| OLD | NEW |