| 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 26 matching lines...) Expand all Loading... |
| 37 virtual bool CopyTexImage(unsigned target) OVERRIDE; | 37 virtual bool CopyTexImage(unsigned target) OVERRIDE; |
| 38 virtual void WillUseTexImage() OVERRIDE; | 38 virtual void WillUseTexImage() OVERRIDE; |
| 39 virtual void WillModifyTexImage() OVERRIDE; | 39 virtual void WillModifyTexImage() OVERRIDE; |
| 40 virtual void DidModifyTexImage() OVERRIDE; | 40 virtual void DidModifyTexImage() OVERRIDE; |
| 41 virtual void DidUseTexImage() OVERRIDE; | 41 virtual void DidUseTexImage() OVERRIDE; |
| 42 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 42 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 43 int z_order, | 43 int z_order, |
| 44 gfx::OverlayTransform transform, | 44 gfx::OverlayTransform transform, |
| 45 const gfx::Rect& bounds_rect, | 45 const gfx::Rect& bounds_rect, |
| 46 const gfx::RectF& crop_rect) OVERRIDE; | 46 const gfx::RectF& crop_rect) OVERRIDE; |
| 47 virtual void SetReleaseAfterUse() OVERRIDE; | |
| 48 | 47 |
| 49 protected: | 48 protected: |
| 50 virtual ~GLImageSync(); | 49 virtual ~GLImageSync(); |
| 51 | 50 |
| 52 private: | 51 private: |
| 53 scoped_refptr<NativeImageBuffer> buffer_; | 52 scoped_refptr<NativeImageBuffer> buffer_; |
| 54 gfx::Size size_; | 53 gfx::Size size_; |
| 55 | 54 |
| 56 DISALLOW_COPY_AND_ASSIGN(GLImageSync); | 55 DISALLOW_COPY_AND_ASSIGN(GLImageSync); |
| 57 }; | 56 }; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 109 |
| 111 bool GLImageSync::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 110 bool GLImageSync::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 112 int z_order, | 111 int z_order, |
| 113 gfx::OverlayTransform transform, | 112 gfx::OverlayTransform transform, |
| 114 const gfx::Rect& bounds_rect, | 113 const gfx::Rect& bounds_rect, |
| 115 const gfx::RectF& crop_rect) { | 114 const gfx::RectF& crop_rect) { |
| 116 NOTREACHED(); | 115 NOTREACHED(); |
| 117 return false; | 116 return false; |
| 118 } | 117 } |
| 119 | 118 |
| 120 void GLImageSync::SetReleaseAfterUse() { | |
| 121 NOTREACHED(); | |
| 122 } | |
| 123 | |
| 124 #if !defined(OS_MACOSX) | 119 #if !defined(OS_MACOSX) |
| 125 class NativeImageBufferEGL : public NativeImageBuffer { | 120 class NativeImageBufferEGL : public NativeImageBuffer { |
| 126 public: | 121 public: |
| 127 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); | 122 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); |
| 128 | 123 |
| 129 private: | 124 private: |
| 130 NativeImageBufferEGL(EGLDisplay display, EGLImageKHR image); | 125 NativeImageBufferEGL(EGLDisplay display, EGLImageKHR image); |
| 131 virtual ~NativeImageBufferEGL(); | 126 virtual ~NativeImageBufferEGL(); |
| 132 virtual void AddClient(gfx::GLImage* client) OVERRIDE; | 127 virtual void AddClient(gfx::GLImage* client) OVERRIDE; |
| 133 virtual void RemoveClient(gfx::GLImage* client) OVERRIDE; | 128 virtual void RemoveClient(gfx::GLImage* client) OVERRIDE; |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 | 487 |
| 493 // All structural changes should have orphaned the texture. | 488 // All structural changes should have orphaned the texture. |
| 494 if (image_buffer_.get() && !texture->GetLevelImage(texture->target(), 0)) | 489 if (image_buffer_.get() && !texture->GetLevelImage(texture->target(), 0)) |
| 495 return false; | 490 return false; |
| 496 | 491 |
| 497 return true; | 492 return true; |
| 498 } | 493 } |
| 499 | 494 |
| 500 } // namespace gles2 | 495 } // namespace gles2 |
| 501 } // namespace gpu | 496 } // namespace gpu |
| OLD | NEW |