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

Side by Side Diff: chrome/browser/renderer_host/accelerated_surface_container_mac.h

Issue 5998002: Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 #ifndef CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_
6 #define CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_
7 #pragma once 7 #pragma once
8 8
9 // The "GPU plugin" is currently implemented as a special kind of 9 // The "GPU plugin" is currently implemented as a special kind of
10 // NPAPI plugin to provide high-performance on-screen 3D rendering for 10 // NPAPI plugin to provide high-performance on-screen 3D rendering for
(...skipping 18 matching lines...) Expand all
29 #include <CoreFoundation/CoreFoundation.h> 29 #include <CoreFoundation/CoreFoundation.h>
30 #include <OpenGL/OpenGL.h> 30 #include <OpenGL/OpenGL.h>
31 31
32 #include "app/surface/transport_dib.h" 32 #include "app/surface/transport_dib.h"
33 #include "base/basictypes.h" 33 #include "base/basictypes.h"
34 #include "base/mac/scoped_cftyperef.h" 34 #include "base/mac/scoped_cftyperef.h"
35 #include "base/scoped_ptr.h" 35 #include "base/scoped_ptr.h"
36 #include "gfx/native_widget_types.h" 36 #include "gfx/native_widget_types.h"
37 #include "gfx/rect.h" 37 #include "gfx/rect.h"
38 38
39 namespace webkit { 39 namespace webkit_glue {
40 namespace npapi {
41 struct WebPluginGeometry; 40 struct WebPluginGeometry;
42 } 41 }
43 }
44 42
45 class AcceleratedSurfaceContainerManagerMac; 43 class AcceleratedSurfaceContainerManagerMac;
46 44
47 class AcceleratedSurfaceContainerMac { 45 class AcceleratedSurfaceContainerMac {
48 public: 46 public:
49 AcceleratedSurfaceContainerMac( 47 AcceleratedSurfaceContainerMac(
50 AcceleratedSurfaceContainerManagerMac* manager, 48 AcceleratedSurfaceContainerManagerMac* manager,
51 bool opaque); 49 bool opaque);
52 virtual ~AcceleratedSurfaceContainerMac(); 50 virtual ~AcceleratedSurfaceContainerMac();
53 51
54 // Sets the backing store and size of this accelerated surface container. 52 // Sets the backing store and size of this accelerated surface container.
55 // There are two versions: the IOSurface version is used on systems where the 53 // There are two versions: the IOSurface version is used on systems where the
56 // IOSurface API is supported (Mac OS X 10.6 and later); the TransportDIB is 54 // IOSurface API is supported (Mac OS X 10.6 and later); the TransportDIB is
57 // used on Mac OS X 10.5 and earlier. 55 // used on Mac OS X 10.5 and earlier.
58 void SetSizeAndIOSurface(int32 width, 56 void SetSizeAndIOSurface(int32 width,
59 int32 height, 57 int32 height,
60 uint64 io_surface_identifier); 58 uint64 io_surface_identifier);
61 void SetSizeAndTransportDIB(int32 width, 59 void SetSizeAndTransportDIB(int32 width,
62 int32 height, 60 int32 height,
63 TransportDIB::Handle transport_dib); 61 TransportDIB::Handle transport_dib);
64 62
65 // Tells the accelerated surface container that its geometry has changed, 63 // Tells the accelerated surface container that its geometry has changed,
66 // for example because of a scroll event. (Note that the container 64 // for example because of a scroll event. (Note that the container
67 // currently only pays attention to the clip width and height, since the 65 // currently only pays attention to the clip width and height, since the
68 // view in which it is hosted is responsible for positioning it on the 66 // view in which it is hosted is responsible for positioning it on the
69 // page.) 67 // page.)
70 void SetGeometry(const webkit::npapi::WebPluginGeometry& geom); 68 void SetGeometry(const webkit_glue::WebPluginGeometry& geom);
71 69
72 // Draws this accelerated surface's contents, texture mapped onto a quad in 70 // Draws this accelerated surface's contents, texture mapped onto a quad in
73 // the given OpenGL context. TODO(kbr): figure out and define exactly how the 71 // the given OpenGL context. TODO(kbr): figure out and define exactly how the
74 // coordinate system will work out. 72 // coordinate system will work out.
75 void Draw(CGLContextObj context); 73 void Draw(CGLContextObj context);
76 74
77 // Causes the next Draw call to trigger a texture upload. Should be called any 75 // Causes the next Draw call to trigger a texture upload. Should be called any
78 // time the drawing context has changed. 76 // time the drawing context has changed.
79 void ForceTextureReload() { texture_needs_upload_ = true; } 77 void ForceTextureReload() { texture_needs_upload_ = true; }
80 78
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 void ReleaseIOSurface(); 142 void ReleaseIOSurface();
145 143
146 // Enqueue our texture for later deletion. 144 // Enqueue our texture for later deletion.
147 void EnqueueTextureForDeletion(); 145 void EnqueueTextureForDeletion();
148 146
149 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac); 147 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac);
150 }; 148 };
151 149
152 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ 150 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_
153 151
OLDNEW
« no previous file with comments | « chrome/browser/plugin_updater.cc ('k') | chrome/browser/renderer_host/accelerated_surface_container_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698