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

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

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "gpu/command_buffer/service/gl_utils.h" 11 #include "gpu/command_buffer/service/gl_utils.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class GLImage; 14 class GLImage;
15 } 15 }
16 16
17 namespace gpu { 17 namespace gpu {
18 namespace gles2 { 18 namespace gles2 {
19 19
20 class Texture; 20 class Texture;
21 21
22 class NativeImageBuffer : public base::RefCountedThreadSafe<NativeImageBuffer> { 22 class NativeImageBuffer : public base::RefCountedThreadSafe<NativeImageBuffer> {
23 public: 23 public:
24 static scoped_refptr<NativeImageBuffer> Create(GLuint texture_id); 24 static scoped_refptr<NativeImageBuffer> Create(GLuint texture_id);
25 25
26 virtual void AddClient(gfx::GLImage* client) = 0; 26 virtual void AddClient(gfx::GLImage* client) = 0;
27 virtual void RemoveClient(gfx::GLImage* client) = 0; 27 virtual void RemoveClient(gfx::GLImage* client) = 0;
28 virtual bool IsClient(gfx::GLImage* client) = 0; 28 virtual bool IsClient(gfx::GLImage* client) = 0;
29 virtual void BindToTexture(GLenum target) = 0; 29 virtual void BindToTexture(GLenum target) = 0;
30 virtual void WillRead(gfx::GLImage* client) = 0;
31 virtual void WillWrite(gfx::GLImage* client) = 0;
32 virtual void DidRead(gfx::GLImage* client) = 0;
33 virtual void DidWrite(gfx::GLImage* client) = 0;
34 30
35 protected: 31 protected:
36 friend class base::RefCountedThreadSafe<NativeImageBuffer>; 32 friend class base::RefCountedThreadSafe<NativeImageBuffer>;
37 NativeImageBuffer() {} 33 NativeImageBuffer() {}
38 virtual ~NativeImageBuffer() {} 34 virtual ~NativeImageBuffer() {}
39 35
40 DISALLOW_COPY_AND_ASSIGN(NativeImageBuffer); 36 DISALLOW_COPY_AND_ASSIGN(NativeImageBuffer);
41 }; 37 };
42 38
43 // An immutable description that can be used to create a texture that shares 39 // An immutable description that can be used to create a texture that shares
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 GLenum wrap_t_; 92 GLenum wrap_t_;
97 GLenum usage_; 93 GLenum usage_;
98 bool immutable_; 94 bool immutable_;
99 LevelInfos level_infos_; 95 LevelInfos level_infos_;
100 }; 96 };
101 97
102 } // namespage gles2 98 } // namespage gles2
103 } // namespace gpu 99 } // namespace gpu
104 100
105 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_ 101 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_DEFINITION_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_translator_unittest.cc ('k') | gpu/command_buffer/service/texture_definition.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698