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 19 matching lines...) Expand all Loading... |
30 const gfx::Size& size); | 30 const gfx::Size& size); |
31 | 31 |
32 // Implement GLImage. | 32 // Implement GLImage. |
33 virtual void Destroy() OVERRIDE; | 33 virtual void Destroy() OVERRIDE; |
34 virtual gfx::Size GetSize() OVERRIDE; | 34 virtual gfx::Size GetSize() OVERRIDE; |
35 virtual bool BindTexImage(unsigned target) OVERRIDE; | 35 virtual bool BindTexImage(unsigned target) OVERRIDE; |
36 virtual void ReleaseTexImage(unsigned target) OVERRIDE; | 36 virtual void ReleaseTexImage(unsigned target) OVERRIDE; |
37 virtual void WillUseTexImage() OVERRIDE; | 37 virtual void WillUseTexImage() OVERRIDE; |
38 virtual void WillModifyTexImage() OVERRIDE; | 38 virtual void WillModifyTexImage() OVERRIDE; |
39 virtual void DidModifyTexImage() OVERRIDE; | 39 virtual void DidModifyTexImage() OVERRIDE; |
40 | |
41 virtual void DidUseTexImage() OVERRIDE; | 40 virtual void DidUseTexImage() OVERRIDE; |
| 41 virtual bool ScheduleOverlayPlane(int z_order, |
| 42 gfx::OverlayTransform transform, |
| 43 const gfx::Rect& bounds_rect, |
| 44 const gfx::RectF& crop_rect) OVERRIDE; |
42 virtual void SetReleaseAfterUse() OVERRIDE; | 45 virtual void SetReleaseAfterUse() OVERRIDE; |
43 | 46 |
44 protected: | 47 protected: |
45 virtual ~GLImageSync(); | 48 virtual ~GLImageSync(); |
46 | 49 |
47 private: | 50 private: |
48 scoped_refptr<NativeImageBuffer> buffer_; | 51 scoped_refptr<NativeImageBuffer> buffer_; |
49 gfx::Size size_; | 52 gfx::Size size_; |
50 | 53 |
51 DISALLOW_COPY_AND_ASSIGN(GLImageSync); | 54 DISALLOW_COPY_AND_ASSIGN(GLImageSync); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 void GLImageSync::WillModifyTexImage() { | 94 void GLImageSync::WillModifyTexImage() { |
92 if (buffer_) | 95 if (buffer_) |
93 buffer_->WillWrite(this); | 96 buffer_->WillWrite(this); |
94 } | 97 } |
95 | 98 |
96 void GLImageSync::DidModifyTexImage() { | 99 void GLImageSync::DidModifyTexImage() { |
97 if (buffer_) | 100 if (buffer_) |
98 buffer_->DidWrite(this); | 101 buffer_->DidWrite(this); |
99 } | 102 } |
100 | 103 |
| 104 bool GLImageSync::ScheduleOverlayPlane(int z_order, |
| 105 gfx::OverlayTransform transform, |
| 106 const gfx::Rect& bounds_rect, |
| 107 const gfx::RectF& crop_rect) { |
| 108 NOTREACHED(); |
| 109 return false; |
| 110 } |
| 111 |
101 void GLImageSync::SetReleaseAfterUse() { | 112 void GLImageSync::SetReleaseAfterUse() { |
102 NOTREACHED(); | 113 NOTREACHED(); |
103 } | 114 } |
104 | 115 |
105 #if !defined(OS_MACOSX) | 116 #if !defined(OS_MACOSX) |
106 class NativeImageBufferEGL : public NativeImageBuffer { | 117 class NativeImageBufferEGL : public NativeImageBuffer { |
107 public: | 118 public: |
108 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); | 119 static scoped_refptr<NativeImageBufferEGL> Create(GLuint texture_id); |
109 | 120 |
110 private: | 121 private: |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 | 484 |
474 // All structural changes should have orphaned the texture. | 485 // All structural changes should have orphaned the texture. |
475 if (image_buffer_ && !texture->GetLevelImage(texture->target(), 0)) | 486 if (image_buffer_ && !texture->GetLevelImage(texture->target(), 0)) |
476 return false; | 487 return false; |
477 | 488 |
478 return true; | 489 return true; |
479 } | 490 } |
480 | 491 |
481 } // namespace gles2 | 492 } // namespace gles2 |
482 } // namespace gpu | 493 } // namespace gpu |
OLD | NEW |