OLD | NEW |
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 #include "gpu/command_buffer/service/texture_definition.h" | 5 #include "gpu/command_buffer/service/texture_definition.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/memory/linked_ptr.h" | 9 #include "base/memory/linked_ptr.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 return false; | 107 return false; |
108 } | 108 } |
109 | 109 |
110 #if !defined(OS_MACOSX) | 110 #if !defined(OS_MACOSX) |
111 class NativeImageBufferEGL : public NativeImageBuffer { | 111 class NativeImageBufferEGL : public NativeImageBuffer { |
112 public: | 112 public: |
113 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); | 113 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); |
114 | 114 |
115 private: | 115 private: |
116 NativeImageBufferEGL(EGLDisplay display, EGLImageKHR image); | 116 NativeImageBufferEGL(EGLDisplay display, EGLImageKHR image); |
117 virtual ~NativeImageBufferEGL(); | 117 ~NativeImageBufferEGL() override; |
118 virtual void AddClient(gfx::GLImage* client) override; | 118 void AddClient(gfx::GLImage* client) override; |
119 virtual void RemoveClient(gfx::GLImage* client) override; | 119 void RemoveClient(gfx::GLImage* client) override; |
120 virtual bool IsClient(gfx::GLImage* client) override; | 120 bool IsClient(gfx::GLImage* client) override; |
121 virtual void BindToTexture(GLenum target) override; | 121 void BindToTexture(GLenum target) override; |
122 | 122 |
123 EGLDisplay egl_display_; | 123 EGLDisplay egl_display_; |
124 EGLImageKHR egl_image_; | 124 EGLImageKHR egl_image_; |
125 | 125 |
126 base::Lock lock_; | 126 base::Lock lock_; |
127 | 127 |
128 struct ClientInfo { | 128 struct ClientInfo { |
129 ClientInfo(gfx::GLImage* client); | 129 ClientInfo(gfx::GLImage* client); |
130 ~ClientInfo(); | 130 ~ClientInfo(); |
131 | 131 |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 419 |
420 // All structural changes should have orphaned the texture. | 420 // All structural changes should have orphaned the texture. |
421 if (image_buffer_.get() && !texture->GetLevelImage(texture->target(), 0)) | 421 if (image_buffer_.get() && !texture->GetLevelImage(texture->target(), 0)) |
422 return false; | 422 return false; |
423 | 423 |
424 return true; | 424 return true; |
425 } | 425 } |
426 | 426 |
427 } // namespace gles2 | 427 } // namespace gles2 |
428 } // namespace gpu | 428 } // namespace gpu |
OLD | NEW |