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/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 unsigned GetInternalFormat() override; | 36 unsigned GetInternalFormat() override; |
37 bool BindTexImage(unsigned target) override; | 37 bool BindTexImage(unsigned target) override; |
38 void ReleaseTexImage(unsigned target) override; | 38 void ReleaseTexImage(unsigned target) override; |
39 bool CopyTexImage(unsigned target) override; | 39 bool CopyTexImage(unsigned target) override; |
40 bool CopyTexSubImage(unsigned target, | 40 bool CopyTexSubImage(unsigned target, |
41 const gfx::Point& offset, | 41 const gfx::Point& offset, |
42 const gfx::Rect& rect) override; | 42 const gfx::Rect& rect) override; |
43 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 43 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
44 int z_order, | 44 int z_order, |
45 gfx::OverlayTransform transform, | 45 gfx::OverlayTransform transform, |
| 46 gfx::BufferFormat storage_format, |
46 const gfx::Rect& bounds_rect, | 47 const gfx::Rect& bounds_rect, |
47 const gfx::RectF& crop_rect) override; | 48 const gfx::RectF& crop_rect, |
| 49 bool handle_scaling) override; |
48 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 50 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
49 uint64_t process_tracing_id, | 51 uint64_t process_tracing_id, |
50 const std::string& dump_name) override; | 52 const std::string& dump_name) override; |
51 | 53 |
52 protected: | 54 protected: |
53 ~GLImageSync() override; | 55 ~GLImageSync() override; |
54 | 56 |
55 private: | 57 private: |
56 scoped_refptr<NativeImageBuffer> buffer_; | 58 scoped_refptr<NativeImageBuffer> buffer_; |
57 gfx::Size size_; | 59 gfx::Size size_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 99 |
98 bool GLImageSync::CopyTexSubImage(unsigned target, | 100 bool GLImageSync::CopyTexSubImage(unsigned target, |
99 const gfx::Point& offset, | 101 const gfx::Point& offset, |
100 const gfx::Rect& rect) { | 102 const gfx::Rect& rect) { |
101 return false; | 103 return false; |
102 } | 104 } |
103 | 105 |
104 bool GLImageSync::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 106 bool GLImageSync::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
105 int z_order, | 107 int z_order, |
106 gfx::OverlayTransform transform, | 108 gfx::OverlayTransform transform, |
| 109 gfx::BufferFormat storage_format, |
107 const gfx::Rect& bounds_rect, | 110 const gfx::Rect& bounds_rect, |
108 const gfx::RectF& crop_rect) { | 111 const gfx::RectF& crop_rect, |
| 112 bool handle_scaling) { |
109 NOTREACHED(); | 113 NOTREACHED(); |
110 return false; | 114 return false; |
111 } | 115 } |
112 | 116 |
113 void GLImageSync::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 117 void GLImageSync::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
114 uint64_t process_tracing_id, | 118 uint64_t process_tracing_id, |
115 const std::string& dump_name) { | 119 const std::string& dump_name) { |
116 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 | 120 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 |
117 } | 121 } |
118 | 122 |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 return true; | 458 return true; |
455 } | 459 } |
456 | 460 |
457 bool TextureDefinition::SafeToRenderFrom() const { | 461 bool TextureDefinition::SafeToRenderFrom() const { |
458 return level_info_.cleared_rect.Contains( | 462 return level_info_.cleared_rect.Contains( |
459 gfx::Rect(level_info_.width, level_info_.height)); | 463 gfx::Rect(level_info_.width, level_info_.height)); |
460 } | 464 } |
461 | 465 |
462 } // namespace gles2 | 466 } // namespace gles2 |
463 } // namespace gpu | 467 } // namespace gpu |
OLD | NEW |