| 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 13 matching lines...) Expand all Loading... |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 class GLImageSync : public gfx::GLImage { | 26 class GLImageSync : public gfx::GLImage { |
| 27 public: | 27 public: |
| 28 explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer, | 28 explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer, |
| 29 const gfx::Size& size); | 29 const gfx::Size& size); |
| 30 | 30 |
| 31 // Implement GLImage. | 31 // Implement GLImage. |
| 32 void Destroy(bool have_context) override; | 32 void Destroy(bool have_context) override; |
| 33 gfx::Size GetSize() override; | 33 gfx::Size GetSize() override; |
| 34 unsigned GetInternalFormat() override; |
| 34 bool BindTexImage(unsigned target) override; | 35 bool BindTexImage(unsigned target) override; |
| 35 void ReleaseTexImage(unsigned target) override; | 36 void ReleaseTexImage(unsigned target) override; |
| 36 bool CopyTexImage(unsigned target) override; | 37 bool CopyTexImage(unsigned target) override; |
| 37 void WillUseTexImage() override; | 38 void WillUseTexImage() override; |
| 38 void WillModifyTexImage() override; | 39 void WillModifyTexImage() override; |
| 39 void DidModifyTexImage() override; | 40 void DidModifyTexImage() override; |
| 40 void DidUseTexImage() override; | 41 void DidUseTexImage() override; |
| 41 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 42 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 42 int z_order, | 43 int z_order, |
| 43 gfx::OverlayTransform transform, | 44 gfx::OverlayTransform transform, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 66 buffer_->RemoveClient(this); | 67 buffer_->RemoveClient(this); |
| 67 } | 68 } |
| 68 | 69 |
| 69 void GLImageSync::Destroy(bool have_context) { | 70 void GLImageSync::Destroy(bool have_context) { |
| 70 } | 71 } |
| 71 | 72 |
| 72 gfx::Size GLImageSync::GetSize() { | 73 gfx::Size GLImageSync::GetSize() { |
| 73 return size_; | 74 return size_; |
| 74 } | 75 } |
| 75 | 76 |
| 77 unsigned GLImageSync::GetInternalFormat() { |
| 78 return GL_RGBA; |
| 79 } |
| 80 |
| 76 bool GLImageSync::BindTexImage(unsigned target) { | 81 bool GLImageSync::BindTexImage(unsigned target) { |
| 77 NOTREACHED(); | 82 NOTREACHED(); |
| 78 return false; | 83 return false; |
| 79 } | 84 } |
| 80 | 85 |
| 81 void GLImageSync::ReleaseTexImage(unsigned target) { | 86 void GLImageSync::ReleaseTexImage(unsigned target) { |
| 82 NOTREACHED(); | 87 NOTREACHED(); |
| 83 } | 88 } |
| 84 | 89 |
| 85 bool GLImageSync::CopyTexImage(unsigned target) { | 90 bool GLImageSync::CopyTexImage(unsigned target) { |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 452 |
| 448 return true; | 453 return true; |
| 449 } | 454 } |
| 450 | 455 |
| 451 bool TextureDefinition::SafeToRenderFrom() const { | 456 bool TextureDefinition::SafeToRenderFrom() const { |
| 452 return level_info_.cleared; | 457 return level_info_.cleared; |
| 453 } | 458 } |
| 454 | 459 |
| 455 } // namespace gles2 | 460 } // namespace gles2 |
| 456 } // namespace gpu | 461 } // namespace gpu |
| OLD | NEW |