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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.h

Issue 7518016: Revert 94743 - Allow the renderer process to map textures from one context into another. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 | « gpu/command_buffer/common/constants.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.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 // This file contains the GLES2Decoder class. 5 // This file contains the GLES2Decoder class.
6 6
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/callback_old.h" 13 #include "base/callback_old.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "gpu/command_buffer/common/constants.h"
16 #include "gpu/command_buffer/service/common_decoder.h" 15 #include "gpu/command_buffer/service/common_decoder.h"
17 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
18 17
19 namespace gfx { 18 namespace gfx {
20 class GLContext; 19 class GLContext;
21 class GLSurface; 20 class GLSurface;
22 } 21 }
23 22
24 namespace gpu { 23 namespace gpu {
25 24
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface, 70 virtual bool Initialize(const scoped_refptr<gfx::GLSurface>& surface,
72 const scoped_refptr<gfx::GLContext>& context, 71 const scoped_refptr<gfx::GLContext>& context,
73 const gfx::Size& size, 72 const gfx::Size& size,
74 const DisallowedExtensions& disallowed_extensions, 73 const DisallowedExtensions& disallowed_extensions,
75 const char* allowed_extensions, 74 const char* allowed_extensions,
76 const std::vector<int32>& attribs) = 0; 75 const std::vector<int32>& attribs) = 0;
77 76
78 // Destroys the graphics context. 77 // Destroys the graphics context.
79 virtual void Destroy() = 0; 78 virtual void Destroy() = 0;
80 79
81 // Map a resource from an external context into this context. The source
82 // context need not be in the same share group from the client's point of
83 // view, allowing safe sharing between an "untrusted" context, like Pepper
84 // and a compositor context.
85 //
86 // Currently only texture resources are supported. TODO(apatrick): generalize
87 // this as appropriate.
88 //
89 // To unmap a previously mapped external resource, delete it in the
90 // destination context group. This will not delete the underlying texture
91 // object, just disassociate it with the id in the destination context group.
92 //
93 // The lifetime of the external resource is managed by the context group it
94 // was originally created in. When the last context in that group is destroyed
95 // the resource becomes invalid in all other context groups it is mapped into.
96 virtual bool MapExternalResource(resource_type::ResourceType resource_type,
97 uint32 resource_source_id,
98 GLES2Decoder* source_decoder,
99 uint32 resource_dest_id) = 0;
100
101 virtual bool SetParent(GLES2Decoder* parent_decoder, 80 virtual bool SetParent(GLES2Decoder* parent_decoder,
102 uint32 parent_texture_id) = 0; 81 uint32 parent_texture_id) = 0;
103 82
104 // Resize an offscreen frame buffer. 83 // Resize an offscreen frame buffer.
105 virtual void ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; 84 virtual void ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0;
106 85
107 // Force the offscreen frame buffer's size to be updated. This 86 // Force the offscreen frame buffer's size to be updated. This
108 // usually occurs lazily, during SwapBuffers, but on some platforms 87 // usually occurs lazily, during SwapBuffers, but on some platforms
109 // (Mac OS X in particular) it must be done immediately. 88 // (Mac OS X in particular) it must be done immediately.
110 virtual bool UpdateOffscreenFrameBufferSize() = 0; 89 virtual bool UpdateOffscreenFrameBufferSize() = 0;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 private: 124 private:
146 bool debug_; 125 bool debug_;
147 126
148 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); 127 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder);
149 }; 128 };
150 129
151 } // namespace gles2 130 } // namespace gles2
152 } // namespace gpu 131 } // namespace gpu
153 132
154 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ 133 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/constants.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698