| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
| 6 #include <math.h> | 6 #include <math.h> |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 54 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 55 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 55 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 56 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, | 56 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, |
| 57 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, | 57 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, |
| 58 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | 58 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 59 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, | 59 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, |
| 60 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, | 60 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, |
| 61 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, | 61 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, |
| 62 }; | 62 }; |
| 63 const uint8_t* input = &kRLETextureData[0]; | 63 const uint8_t* input = &kRLETextureData[0]; |
| 64 const uint8_t * const input_end = &kRLETextureData[kRLETextureDataLength]; | 64 const uint8_t* const input_end = &kRLETextureData[kRLETextureDataLength]; |
| 65 uint8_t* output = &g_texture_data[0]; | 65 uint8_t* output = &g_texture_data[0]; |
| 66 const uint8_t * const output_end = &g_texture_data[kTextureDataLength]; | 66 #ifndef NDEBUG |
| 67 const uint8_t* const output_end = &g_texture_data[kTextureDataLength]; |
| 68 #endif |
| 67 | 69 |
| 68 uint8_t decoded[4]; | 70 uint8_t decoded[4]; |
| 69 int decoded_count = 0; | 71 int decoded_count = 0; |
| 70 | 72 |
| 71 while (input < input_end || decoded_count > 0) { | 73 while (input < input_end || decoded_count > 0) { |
| 72 if (decoded_count < 2) { | 74 if (decoded_count < 2) { |
| 73 assert(input + 4 <= input_end); | 75 assert(input + 4 <= input_end); |
| 74 // Grab four base-64 encoded (6-bit) bytes. | 76 // Grab four base-64 encoded (6-bit) bytes. |
| 75 uint32_t data = 0; | 77 uint32_t data = 0; |
| 76 data |= (kBase64Decode[*input++] << 18); | 78 data |= (kBase64Decode[*input++] << 18); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 virtual ~Graphics3DModule() {} | 495 virtual ~Graphics3DModule() {} |
| 494 | 496 |
| 495 virtual pp::Instance* CreateInstance(PP_Instance instance) { | 497 virtual pp::Instance* CreateInstance(PP_Instance instance) { |
| 496 return new Graphics3DInstance(instance); | 498 return new Graphics3DInstance(instance); |
| 497 } | 499 } |
| 498 }; | 500 }; |
| 499 | 501 |
| 500 namespace pp { | 502 namespace pp { |
| 501 Module* CreateModule() { return new Graphics3DModule(); } | 503 Module* CreateModule() { return new Graphics3DModule(); } |
| 502 } // namespace pp | 504 } // namespace pp |
| OLD | NEW |