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

Side by Side Diff: content/common/gpu/image_transport_surface.h

Issue 7890046: Command to mark surface inactive, so gpu process can release resources. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fixing mock gles2 cmd decoder Created 9 years, 2 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 | « no previous file | content/common/gpu/image_transport_surface.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU) 9 #if defined(ENABLE_GPU)
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // The ImageTransportSurfaceHelper provides some glue to the outside world: 45 // The ImageTransportSurfaceHelper provides some glue to the outside world:
46 // making sure outside events reach the ImageTransportSurface and 46 // making sure outside events reach the ImageTransportSurface and
47 // allowing the ImageTransportSurface to send events to the outside world. 47 // allowing the ImageTransportSurface to send events to the outside world.
48 48
49 class ImageTransportSurface { 49 class ImageTransportSurface {
50 public: 50 public:
51 virtual void OnNewSurfaceACK( 51 virtual void OnNewSurfaceACK(
52 uint64 surface_id, TransportDIB::Handle surface_handle) = 0; 52 uint64 surface_id, TransportDIB::Handle surface_handle) = 0;
53 virtual void OnBuffersSwappedACK() = 0; 53 virtual void OnBuffersSwappedACK() = 0;
54 virtual void OnResize(gfx::Size size) = 0; 54 virtual void OnResize(gfx::Size size) = 0;
55 virtual void OnSurfaceVisible(bool visible) = 0;
55 56
56 // Creates the appropriate surface depending on the GL implementation. 57 // Creates the appropriate surface depending on the GL implementation.
57 static scoped_refptr<gfx::GLSurface> 58 static scoped_refptr<gfx::GLSurface>
58 CreateSurface(GpuChannelManager* manager, 59 CreateSurface(GpuChannelManager* manager,
59 int32 render_view_id, 60 int32 render_view_id,
60 int32 renderer_id, 61 int32 renderer_id,
61 int32 command_buffer_id, 62 int32 command_buffer_id,
62 gfx::PluginWindowHandle handle); 63 gfx::PluginWindowHandle handle);
63 }; 64 };
64 65
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 gpu::GpuScheduler* Scheduler(); 99 gpu::GpuScheduler* Scheduler();
99 gpu::gles2::GLES2Decoder* Decoder(); 100 gpu::gles2::GLES2Decoder* Decoder();
100 101
101 // IPC::Message handlers. 102 // IPC::Message handlers.
102 void OnNewSurfaceACK(uint64 surface_id, TransportDIB::Handle surface_handle); 103 void OnNewSurfaceACK(uint64 surface_id, TransportDIB::Handle surface_handle);
103 void OnBuffersSwappedACK(); 104 void OnBuffersSwappedACK();
104 105
105 // Backbuffer resize callback. 106 // Backbuffer resize callback.
106 void Resize(gfx::Size size); 107 void Resize(gfx::Size size);
107 108
109 // Backbuffer visibility change callback.
110 void SurfaceVisible(bool visible);
apatrick_chromium 2011/10/07 22:45:49 I'm still not clear why you want to add a new GL c
mmocny 2011/10/11 13:58:43 You are correct. First I thought it would not be p
111
108 // Weak pointers that point to objects that outlive this helper. 112 // Weak pointers that point to objects that outlive this helper.
109 ImageTransportSurface* surface_; 113 ImageTransportSurface* surface_;
110 GpuChannelManager* manager_; 114 GpuChannelManager* manager_;
111 115
112 int32 render_view_id_; 116 int32 render_view_id_;
113 int32 renderer_id_; 117 int32 renderer_id_;
114 int32 command_buffer_id_; 118 int32 command_buffer_id_;
115 int32 route_id_; 119 int32 route_id_;
116 gfx::PluginWindowHandle handle_; 120 gfx::PluginWindowHandle handle_;
117 121
118 DISALLOW_COPY_AND_ASSIGN(ImageTransportHelper); 122 DISALLOW_COPY_AND_ASSIGN(ImageTransportHelper);
119 }; 123 };
120 124
121 #endif // defined(ENABLE_GPU) 125 #endif // defined(ENABLE_GPU)
122 126
123 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 127 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698