| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 493 |
| 494 CommandBufferOffset fail_get = put; | 494 CommandBufferOffset fail_get = put; |
| 495 CommandHeader header; | 495 CommandHeader header; |
| 496 header.size = 3; | 496 header.size = 3; |
| 497 header.command = 4; | 497 header.command = 4; |
| 498 entries[put++].value_header = header; | 498 entries[put++].value_header = header; |
| 499 entries[put++].value_uint32 = 5; | 499 entries[put++].value_uint32 = 5; |
| 500 entries[put++].value_uint32 = 6; | 500 entries[put++].value_uint32 = 6; |
| 501 | 501 |
| 502 // we should be beyond the end of the buffer now. | 502 // we should be beyond the end of the buffer now. |
| 503 DCHECK_LT(6, put); | 503 DCHECK_LT(6U, put); |
| 504 put = 0; | 504 put = 0; |
| 505 | 505 |
| 506 engine()->Put(put); | 506 engine()->Put(put); |
| 507 while (get != put) { | 507 while (get != put) { |
| 508 // When the parsing stop progressing, break. | 508 // When the parsing stop progressing, break. |
| 509 CommandBufferOffset new_get = engine()->WaitGetChanges(get); | 509 CommandBufferOffset new_get = engine()->WaitGetChanges(get); |
| 510 if (new_get == get) { | 510 if (new_get == get) { |
| 511 EXPECT_EQ(new_get, engine()->Get()); | 511 EXPECT_EQ(new_get, engine()->Get()); |
| 512 break; | 512 break; |
| 513 } | 513 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 EXPECT_CALL(*process_mock(), ProcessMessage()).WillOnce(Return(false)); | 617 EXPECT_CALL(*process_mock(), ProcessMessage()).WillOnce(Return(false)); |
| 618 EXPECT_FALSE(engine()->DoWork()); | 618 EXPECT_FALSE(engine()->DoWork()); |
| 619 Mock::VerifyAndClearExpectations(process_mock()); | 619 Mock::VerifyAndClearExpectations(process_mock()); |
| 620 | 620 |
| 621 engine()->CloseConnection(); | 621 engine()->CloseConnection(); |
| 622 DestroyCommandBuffer(); | 622 DestroyCommandBuffer(); |
| 623 } | 623 } |
| 624 | 624 |
| 625 } // namespace command_buffer | 625 } // namespace command_buffer |
| 626 } // namespace o3d | 626 } // namespace o3d |
| OLD | NEW |