| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #define PEPPER_APIS_ENABLED 1 | 5 #define PEPPER_APIS_ENABLED 1 |
| 6 | 6 |
| 7 #include "chrome/renderer/webplugin_delegate_pepper.h" | 7 #include "chrome/renderer/webplugin_delegate_pepper.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 if (callback) { | 772 if (callback) { |
| 773 command_buffer_->AsyncFlush( | 773 command_buffer_->AsyncFlush( |
| 774 context->putOffset, | 774 context->putOffset, |
| 775 method_factory3d_.NewRunnableMethod( | 775 method_factory3d_.NewRunnableMethod( |
| 776 &WebPluginDelegatePepper::Device3DUpdateState, | 776 &WebPluginDelegatePepper::Device3DUpdateState, |
| 777 id, | 777 id, |
| 778 context, | 778 context, |
| 779 callback, | 779 callback, |
| 780 user_data)); | 780 user_data)); |
| 781 } else { | 781 } else { |
| 782 state = command_buffer_->Flush(context->putOffset); | 782 state = command_buffer_->FlushSync(context->putOffset); |
| 783 Synchronize3DContext(context, state); | 783 Synchronize3DContext(context, state); |
| 784 } | 784 } |
| 785 } else { | 785 } else { |
| 786 if (callback) { | 786 if (callback) { |
| 787 command_buffer_->AsyncGetState( | 787 command_buffer_->AsyncGetState( |
| 788 method_factory3d_.NewRunnableMethod( | 788 method_factory3d_.NewRunnableMethod( |
| 789 &WebPluginDelegatePepper::Device3DUpdateState, | 789 &WebPluginDelegatePepper::Device3DUpdateState, |
| 790 id, | 790 id, |
| 791 context, | 791 context, |
| 792 callback, | 792 callback, |
| (...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1761 CGRect bounds; | 1761 CGRect bounds; |
| 1762 bounds.origin.x = dest_rect.x(); | 1762 bounds.origin.x = dest_rect.x(); |
| 1763 bounds.origin.y = canvas_height - dest_rect.y() - dest_rect.height(); | 1763 bounds.origin.y = canvas_height - dest_rect.y() - dest_rect.height(); |
| 1764 bounds.size.width = dest_rect.width(); | 1764 bounds.size.width = dest_rect.width(); |
| 1765 bounds.size.height = dest_rect.height(); | 1765 bounds.size.height = dest_rect.height(); |
| 1766 | 1766 |
| 1767 CGContextDrawImage(canvas, bounds, image); | 1767 CGContextDrawImage(canvas, bounds, image); |
| 1768 CGContextRestoreGState(canvas); | 1768 CGContextRestoreGState(canvas); |
| 1769 } | 1769 } |
| 1770 #endif // defined(OS_MACOSX) | 1770 #endif // defined(OS_MACOSX) |
| OLD | NEW |