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

Side by Side Diff: content/plugin/webplugin_accelerated_surface_proxy_mac.cc

Issue 6672048: Move plugin code to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 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
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 #import <OpenGL/OpenGL.h> 5 #import <OpenGL/OpenGL.h>
6 6
7 #include "chrome/plugin/webplugin_accelerated_surface_proxy_mac.h" 7 #include "content/plugin/webplugin_accelerated_surface_proxy_mac.h"
8 8
9 #include "app/surface/accelerated_surface_mac.h" 9 #include "app/surface/accelerated_surface_mac.h"
10 #include "app/surface/transport_dib.h" 10 #include "app/surface/transport_dib.h"
11 #include "chrome/plugin/webplugin_proxy.h" 11 #include "content/plugin/webplugin_proxy.h"
12 12
13 WebPluginAcceleratedSurfaceProxy::WebPluginAcceleratedSurfaceProxy( 13 WebPluginAcceleratedSurfaceProxy::WebPluginAcceleratedSurfaceProxy(
14 WebPluginProxy* plugin_proxy) 14 WebPluginProxy* plugin_proxy)
15 : plugin_proxy_(plugin_proxy), 15 : plugin_proxy_(plugin_proxy),
16 window_handle_(NULL) { 16 window_handle_(NULL) {
17 surface_ = new AcceleratedSurface; 17 surface_ = new AcceleratedSurface;
18 // It's possible for OpenGL to fail to initialze (e.g., if an incompatible 18 // It's possible for OpenGL to fail to initialze (e.g., if an incompatible
19 // mode is forced via flags), so handle that gracefully. 19 // mode is forced via flags), so handle that gracefully.
20 if (!surface_->Initialize(NULL, true)) { 20 if (!surface_->Initialize(NULL, true)) {
21 delete surface_; 21 delete surface_;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 void WebPluginAcceleratedSurfaceProxy::EndDrawing() { 72 void WebPluginAcceleratedSurfaceProxy::EndDrawing() {
73 if (!surface_) 73 if (!surface_)
74 return; 74 return;
75 75
76 surface_->SwapBuffers(); 76 surface_->SwapBuffers();
77 plugin_proxy_->AcceleratedFrameBuffersDidSwap( 77 plugin_proxy_->AcceleratedFrameBuffersDidSwap(
78 window_handle_, surface_->GetSurfaceId()); 78 window_handle_, surface_->GetSurfaceId());
79 } 79 }
OLDNEW
« no previous file with comments | « content/plugin/webplugin_accelerated_surface_proxy_mac.h ('k') | content/plugin/webplugin_delegate_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698