Chromium Code Reviews

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

Issue 4148004: Mac gpu: on gpu<->nongpu transitions, make sure to not show uninitialized memory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments 2 Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/renderer_host/accelerated_surface_container_manager_mac.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 #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 58 matching lines...)
69 69
70 // 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
71 // 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
72 // coordinate system will work out. 72 // coordinate system will work out.
73 void Draw(CGLContextObj context); 73 void Draw(CGLContextObj context);
74 74
75 // 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
76 // time the drawing context has changed. 76 // time the drawing context has changed.
77 void ForceTextureReload() { texture_needs_upload_ = true; } 77 void ForceTextureReload() { texture_needs_upload_ = true; }
78 78
79 // Notifies the surface that it was painted to. 79 // Notifies the the container that its surface was painted to.
80 void set_was_painted_to(uint64 surface_id); 80 void set_was_painted_to(uint64 surface_id);
81 81
82 // Notifies the container that its surface is invalid.
83 void set_surface_invalid() { was_painted_to_ = false; }
84
82 // Returns if the surface should be shown. 85 // Returns if the surface should be shown.
83 bool should_be_visible() const { return visible_ && was_painted_to_; } 86 bool should_be_visible() const { return visible_ && was_painted_to_; }
84 private: 87 private:
85 // The manager of this accelerated surface container. 88 // The manager of this accelerated surface container.
86 AcceleratedSurfaceContainerManagerMac* manager_; 89 AcceleratedSurfaceContainerManagerMac* manager_;
87 90
88 // Whether this accelerated surface's content is supposed to be opaque. 91 // Whether this accelerated surface's content is supposed to be opaque.
89 bool opaque_; 92 bool opaque_;
90 93
91 // The IOSurfaceRef, if any, that has been handed from the GPU 94 // The IOSurfaceRef, if any, that has been handed from the GPU
(...skipping 42 matching lines...)
134 void ReleaseIOSurface(); 137 void ReleaseIOSurface();
135 138
136 // Enqueue our texture for later deletion. 139 // Enqueue our texture for later deletion.
137 void EnqueueTextureForDeletion(); 140 void EnqueueTextureForDeletion();
138 141
139 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac); 142 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerMac);
140 }; 143 };
141 144
142 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_ 145 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MAC_H_
143 146
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h » ('j') | no next file with comments »

Powered by Google App Engine