| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <iostream> | 10 #include <iostream> |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 switch (event.GetType()) { | 422 switch (event.GetType()) { |
| 423 case PP_INPUTEVENT_TYPE_MOUSEDOWN: { | 423 case PP_INPUTEVENT_TYPE_MOUSEDOWN: { |
| 424 pp::MouseInputEvent mouse_event(event); | 424 pp::MouseInputEvent mouse_event(event); |
| 425 // Reset all decoders on mouse down. | 425 // Reset all decoders on mouse down. |
| 426 if (mouse_event.GetButton() == PP_INPUTEVENT_MOUSEBUTTON_LEFT) { | 426 if (mouse_event.GetButton() == PP_INPUTEVENT_MOUSEBUTTON_LEFT) { |
| 427 // Reset decoders. | 427 // Reset decoders. |
| 428 for (size_t i = 0; i < video_decoders_.size(); i++) { | 428 for (size_t i = 0; i < video_decoders_.size(); i++) { |
| 429 if (!video_decoders_[i]->resetting()) | 429 if (!video_decoders_[i]->resetting()) |
| 430 video_decoders_[i]->Reset(); | 430 video_decoders_[i]->Reset(); |
| 431 } | 431 } |
| 432 | |
| 433 // Clear pending pictures. | |
| 434 while (!pending_pictures_.empty()) | |
| 435 pending_pictures_.pop(); | |
| 436 } | 432 } |
| 437 return true; | 433 return true; |
| 438 } | 434 } |
| 439 | 435 |
| 440 default: | 436 default: |
| 441 return false; | 437 return false; |
| 442 } | 438 } |
| 443 } | 439 } |
| 444 | 440 |
| 445 void MyInstance::InitializeDecoders() { | 441 void MyInstance::InitializeDecoders() { |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 }; | 726 }; |
| 731 | 727 |
| 732 } // anonymous namespace | 728 } // anonymous namespace |
| 733 | 729 |
| 734 namespace pp { | 730 namespace pp { |
| 735 // Factory function for your specialization of the Module object. | 731 // Factory function for your specialization of the Module object. |
| 736 Module* CreateModule() { | 732 Module* CreateModule() { |
| 737 return new MyModule(); | 733 return new MyModule(); |
| 738 } | 734 } |
| 739 } // namespace pp | 735 } // namespace pp |
| OLD | NEW |