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

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

Issue 1166002: Fix handling of Mac accelerated plugin layers across tab switch. (Closed)
Patch Set: Created 10 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
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 7
8 // The "GPU plugin" is currently implemented as a special kind of 8 // The "GPU plugin" is currently implemented as a special kind of
9 // NPAPI plugin to provide high-performance on-screen 3D rendering for 9 // NPAPI plugin to provide high-performance on-screen 3D rendering for
10 // Pepper 3D. 10 // Pepper 3D.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Tells the accelerated surface container that it has moved relative to the 61 // Tells the accelerated surface container that it has moved relative to the
62 // origin of the window, for example because of a scroll event. 62 // origin of the window, for example because of a scroll event.
63 void MoveTo(const webkit_glue::WebPluginGeometry& geom); 63 void MoveTo(const webkit_glue::WebPluginGeometry& geom);
64 64
65 // Draws this accelerated surface's contents, texture mapped onto a quad in 65 // Draws this accelerated surface's contents, texture mapped onto a quad in
66 // the given OpenGL context. TODO(kbr): figure out and define exactly how the 66 // the given OpenGL context. TODO(kbr): figure out and define exactly how the
67 // coordinate system will work out. 67 // coordinate system will work out.
68 void Draw(CGLContextObj context); 68 void Draw(CGLContextObj context);
69 69
70 // Causes the next Draw call to trigger a texture upload. Should be called any
71 // time the drawing context has changed.
72 void ForceTextureReload() { texture_needs_upload_ = true; }
73
70 // Enqueue our texture for later deletion. Call this before deleting 74 // Enqueue our texture for later deletion. Call this before deleting
71 // this object. 75 // this object.
72 void EnqueueTextureForDeletion( 76 void EnqueueTextureForDeletion(
73 AcceleratedSurfaceContainerManagerMac* manager); 77 AcceleratedSurfaceContainerManagerMac* manager);
74 78
75 private: 79 private:
76 // The x and y coordinates of the plugin window on the web page. 80 // The x and y coordinates of the plugin window on the web page.
77 int x_; 81 int x_;
78 int y_; 82 int y_;
79 83
(...skipping 17 matching lines...) Expand all
97 // The clip rectangle, relative to the (x_, y_) origin. 101 // The clip rectangle, relative to the (x_, y_) origin.
98 gfx::Rect clipRect_; 102 gfx::Rect clipRect_;
99 103
100 // The "live" OpenGL texture referring to this IOSurfaceRef. Note 104 // The "live" OpenGL texture referring to this IOSurfaceRef. Note
101 // that per the CGLTexImageIOSurface2D API we do not need to 105 // that per the CGLTexImageIOSurface2D API we do not need to
102 // explicitly update this texture's contents once created. All we 106 // explicitly update this texture's contents once created. All we
103 // need to do is ensure it is re-bound before attempting to draw 107 // need to do is ensure it is re-bound before attempting to draw
104 // with it. 108 // with it.
105 GLuint texture_; 109 GLuint texture_;
106 110
111 // True if we need to upload the texture again during the next draw.
112 bool texture_needs_upload_;
113
107 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac); 114 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac);
108 }; 115 };
109 116
110 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ 117 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_
111 118
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698