Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: chrome/renderer/webplugin_delegate_pepper.cc

Issue 6316002: Make CommandBuffer::Flush asynchronous, and add CommandBuffer::FlushSync with former semantics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/command_buffer_proxy.cc ('k') | gpu/command_buffer/client/cmd_buffer_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « chrome/renderer/command_buffer_proxy.cc ('k') | gpu/command_buffer/client/cmd_buffer_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698