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 GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ | 5 #ifndef GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ |
6 #define GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ | 6 #define GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
12 #include "gpu/command_buffer/service/gl_stream_texture_image.h" | 14 #include "gpu/command_buffer/service/gl_stream_texture_image.h" |
13 #include "gpu/ipc/service/gpu_command_buffer_stub.h" | 15 #include "gpu/ipc/service/gpu_command_buffer_stub.h" |
14 #include "ipc/ipc_listener.h" | 16 #include "ipc/ipc_listener.h" |
15 #include "ui/gl/android/surface_texture.h" | 17 #include "ui/gl/android/surface_texture.h" |
16 #include "ui/gl/gl_image.h" | 18 #include "ui/gl/gl_image.h" |
17 | 19 |
18 namespace ui { | 20 namespace ui { |
19 class ScopedMakeCurrent; | 21 class ScopedMakeCurrent; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 59 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
58 uint64_t process_tracing_id, | 60 uint64_t process_tracing_id, |
59 const std::string& dump_name) override; | 61 const std::string& dump_name) override; |
60 | 62 |
61 // gpu::gles2::GLStreamTextureMatrix implementation | 63 // gpu::gles2::GLStreamTextureMatrix implementation |
62 void GetTextureMatrix(float xform[16]) override; | 64 void GetTextureMatrix(float xform[16]) override; |
63 | 65 |
64 // GpuCommandBufferStub::DestructionObserver implementation. | 66 // GpuCommandBufferStub::DestructionObserver implementation. |
65 void OnWillDestroyStub() override; | 67 void OnWillDestroyStub() override; |
66 | 68 |
67 scoped_ptr<ui::ScopedMakeCurrent> MakeStubCurrent(); | 69 std::unique_ptr<ui::ScopedMakeCurrent> MakeStubCurrent(); |
68 | 70 |
69 void UpdateTexImage(); | 71 void UpdateTexImage(); |
70 | 72 |
71 // Called when a new frame is available for the SurfaceTexture. | 73 // Called when a new frame is available for the SurfaceTexture. |
72 void OnFrameAvailable(); | 74 void OnFrameAvailable(); |
73 | 75 |
74 // IPC::Listener implementation: | 76 // IPC::Listener implementation: |
75 bool OnMessageReceived(const IPC::Message& message) override; | 77 bool OnMessageReceived(const IPC::Message& message) override; |
76 | 78 |
77 // IPC message handlers: | 79 // IPC message handlers: |
(...skipping 24 matching lines...) Expand all Loading... |
102 unsigned vertex_buffer_; | 104 unsigned vertex_buffer_; |
103 int u_xform_location_; | 105 int u_xform_location_; |
104 | 106 |
105 base::WeakPtrFactory<StreamTexture> weak_factory_; | 107 base::WeakPtrFactory<StreamTexture> weak_factory_; |
106 DISALLOW_COPY_AND_ASSIGN(StreamTexture); | 108 DISALLOW_COPY_AND_ASSIGN(StreamTexture); |
107 }; | 109 }; |
108 | 110 |
109 } // namespace gpu | 111 } // namespace gpu |
110 | 112 |
111 #endif // GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ | 113 #endif // GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ |
OLD | NEW |