OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ | 5 #ifndef CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ |
6 #define CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ | 6 #define CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "content/common/gpu/gpu_command_buffer_stub.h" | 10 #include "content/common/gpu/gpu_command_buffer_stub.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 public IPC::Listener, | 22 public IPC::Listener, |
23 public GpuCommandBufferStub::DestructionObserver { | 23 public GpuCommandBufferStub::DestructionObserver { |
24 public: | 24 public: |
25 static bool Create(GpuCommandBufferStub* owner_stub, | 25 static bool Create(GpuCommandBufferStub* owner_stub, |
26 uint32 client_texture_id, | 26 uint32 client_texture_id, |
27 int stream_id); | 27 int stream_id); |
28 | 28 |
29 private: | 29 private: |
30 StreamTexture(GpuCommandBufferStub* owner_stub, | 30 StreamTexture(GpuCommandBufferStub* owner_stub, |
31 int32 route_id, | 31 int32 route_id, |
| 32 uint32 client_texture_id, |
32 uint32 texture_id); | 33 uint32 texture_id); |
33 ~StreamTexture() override; | 34 ~StreamTexture() override; |
34 | 35 |
35 // gfx::GLImage implementation: | 36 // gfx::GLImage implementation: |
36 void Destroy(bool have_context) override; | 37 void Destroy(bool have_context) override; |
37 gfx::Size GetSize() override; | 38 gfx::Size GetSize() override; |
38 unsigned GetInternalFormat() override; | 39 unsigned GetInternalFormat() override; |
39 bool BindTexImage(unsigned target) override; | 40 bool BindTexImage(unsigned target) override; |
40 void ReleaseTexImage(unsigned target) override; | 41 void ReleaseTexImage(unsigned target) override; |
| 42 bool CopyTexImage(unsigned target) override; |
41 bool CopyTexSubImage(unsigned target, | 43 bool CopyTexSubImage(unsigned target, |
42 const gfx::Point& offset, | 44 const gfx::Point& offset, |
43 const gfx::Rect& rect) override; | 45 const gfx::Rect& rect) override; |
44 void WillUseTexImage() override; | |
45 void DidUseTexImage() override {} | |
46 void WillModifyTexImage() override {} | |
47 void DidModifyTexImage() override {} | |
48 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 46 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
49 int z_order, | 47 int z_order, |
50 gfx::OverlayTransform transform, | 48 gfx::OverlayTransform transform, |
51 const gfx::Rect& bounds_rect, | 49 const gfx::Rect& bounds_rect, |
52 const gfx::RectF& crop_rect) override; | 50 const gfx::RectF& crop_rect) override; |
53 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 51 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
54 uint64_t process_tracing_id, | 52 uint64_t process_tracing_id, |
55 const std::string& dump_name) override; | 53 const std::string& dump_name) override; |
56 | 54 |
57 // GpuCommandBufferStub::DestructionObserver implementation. | 55 // GpuCommandBufferStub::DestructionObserver implementation. |
(...skipping 20 matching lines...) Expand all Loading... |
78 | 76 |
79 // Whether we ever bound a valid frame. | 77 // Whether we ever bound a valid frame. |
80 bool has_valid_frame_; | 78 bool has_valid_frame_; |
81 | 79 |
82 // Whether a new frame is available that we should update to. | 80 // Whether a new frame is available that we should update to. |
83 bool has_pending_frame_; | 81 bool has_pending_frame_; |
84 | 82 |
85 GpuCommandBufferStub* owner_stub_; | 83 GpuCommandBufferStub* owner_stub_; |
86 int32 route_id_; | 84 int32 route_id_; |
87 bool has_listener_; | 85 bool has_listener_; |
| 86 uint32 client_texture_id_; |
88 | 87 |
89 base::WeakPtrFactory<StreamTexture> weak_factory_; | 88 base::WeakPtrFactory<StreamTexture> weak_factory_; |
90 DISALLOW_COPY_AND_ASSIGN(StreamTexture); | 89 DISALLOW_COPY_AND_ASSIGN(StreamTexture); |
91 }; | 90 }; |
92 | 91 |
93 } // namespace content | 92 } // namespace content |
94 | 93 |
95 #endif // CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ | 94 #endif // CONTENT_COMMON_GPU_STREAM_TEXTURE_ANDROID_H_ |
OLD | NEW |