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 16 matching lines...) Expand all Loading... | |
27 class GLImageSync : public gfx::GLImage { | 27 class GLImageSync : public gfx::GLImage { |
28 public: | 28 public: |
29 explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer, | 29 explicit GLImageSync(const scoped_refptr<NativeImageBuffer>& buffer, |
30 const gfx::Size& size); | 30 const gfx::Size& size); |
31 | 31 |
32 // Implement GLImage. | 32 // Implement GLImage. |
33 virtual void Destroy(bool have_context) OVERRIDE; | 33 virtual void Destroy(bool have_context) 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 bool CopyTexImage(unsigned target) OVERRIDE; | |
37 virtual void WillUseTexImage() OVERRIDE; | 38 virtual void WillUseTexImage() OVERRIDE; |
38 virtual void WillModifyTexImage() OVERRIDE; | 39 virtual void WillModifyTexImage() OVERRIDE; |
39 virtual void DidModifyTexImage() OVERRIDE; | 40 virtual void DidModifyTexImage() OVERRIDE; |
40 virtual void DidUseTexImage() OVERRIDE; | 41 virtual void DidUseTexImage() OVERRIDE; |
41 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 42 virtual bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
42 int z_order, | 43 int z_order, |
43 gfx::OverlayTransform transform, | 44 gfx::OverlayTransform transform, |
44 const gfx::Rect& bounds_rect, | 45 const gfx::Rect& bounds_rect, |
45 const gfx::RectF& crop_rect) OVERRIDE; | 46 const gfx::RectF& crop_rect) OVERRIDE; |
46 virtual void SetReleaseAfterUse() OVERRIDE; | 47 virtual void SetReleaseAfterUse() OVERRIDE; |
(...skipping 29 matching lines...) Expand all Loading... | |
76 | 77 |
77 bool GLImageSync::BindTexImage(unsigned target) { | 78 bool GLImageSync::BindTexImage(unsigned target) { |
78 NOTREACHED(); | 79 NOTREACHED(); |
79 return false; | 80 return false; |
80 } | 81 } |
81 | 82 |
82 void GLImageSync::ReleaseTexImage(unsigned target) { | 83 void GLImageSync::ReleaseTexImage(unsigned target) { |
83 NOTREACHED(); | 84 NOTREACHED(); |
84 } | 85 } |
85 | 86 |
87 bool GLImageSync::CopyTexImage(unsigned target) { | |
88 NOTREACHED(); | |
no sievers
2014/09/08 17:19:01
This one is called too since it's used for webgl b
| |
89 return false; | |
90 } | |
91 | |
86 void GLImageSync::WillUseTexImage() { | 92 void GLImageSync::WillUseTexImage() { |
87 if (buffer_.get()) | 93 if (buffer_.get()) |
88 buffer_->WillRead(this); | 94 buffer_->WillRead(this); |
89 } | 95 } |
90 | 96 |
91 void GLImageSync::DidUseTexImage() { | 97 void GLImageSync::DidUseTexImage() { |
92 if (buffer_.get()) | 98 if (buffer_.get()) |
93 buffer_->DidRead(this); | 99 buffer_->DidRead(this); |
94 } | 100 } |
95 | 101 |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
487 | 493 |
488 // All structural changes should have orphaned the texture. | 494 // All structural changes should have orphaned the texture. |
489 if (image_buffer_.get() && !texture->GetLevelImage(texture->target(), 0)) | 495 if (image_buffer_.get() && !texture->GetLevelImage(texture->target(), 0)) |
490 return false; | 496 return false; |
491 | 497 |
492 return true; | 498 return true; |
493 } | 499 } |
494 | 500 |
495 } // namespace gles2 | 501 } // namespace gles2 |
496 } // namespace gpu | 502 } // namespace gpu |
OLD | NEW |