| 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> | 10 #include <memory> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void UpdateTexImage(); | 72 void UpdateTexImage(); |
| 73 | 73 |
| 74 // Called when a new frame is available for the SurfaceTexture. | 74 // Called when a new frame is available for the SurfaceTexture. |
| 75 void OnFrameAvailable(); | 75 void OnFrameAvailable(); |
| 76 | 76 |
| 77 // IPC::Listener implementation: | 77 // IPC::Listener implementation: |
| 78 bool OnMessageReceived(const IPC::Message& message) override; | 78 bool OnMessageReceived(const IPC::Message& message) override; |
| 79 | 79 |
| 80 // IPC message handlers: | 80 // IPC message handlers: |
| 81 void OnStartListening(); | 81 void OnStartListening(); |
| 82 void OnEstablishPeer(int32_t primary_id, int32_t secondary_id); | |
| 83 void OnForwardForSurfaceRequest(const base::UnguessableToken& request_token); | 82 void OnForwardForSurfaceRequest(const base::UnguessableToken& request_token); |
| 84 void OnSetSize(const gfx::Size& size) { size_ = size; } | 83 void OnSetSize(const gfx::Size& size) { size_ = size; } |
| 85 | 84 |
| 86 scoped_refptr<gl::SurfaceTexture> surface_texture_; | 85 scoped_refptr<gl::SurfaceTexture> surface_texture_; |
| 87 | 86 |
| 88 // Current transform matrix of the surface texture. | 87 // Current transform matrix of the surface texture. |
| 89 float current_matrix_[16]; | 88 float current_matrix_[16]; |
| 90 | 89 |
| 91 // Current size of the surface texture. | 90 // Current size of the surface texture. |
| 92 gfx::Size size_; | 91 gfx::Size size_; |
| 93 | 92 |
| 94 // Whether a new frame is available that we should update to. | 93 // Whether a new frame is available that we should update to. |
| 95 bool has_pending_frame_; | 94 bool has_pending_frame_; |
| 96 | 95 |
| 97 GpuCommandBufferStub* owner_stub_; | 96 GpuCommandBufferStub* owner_stub_; |
| 98 int32_t route_id_; | 97 int32_t route_id_; |
| 99 bool has_listener_; | 98 bool has_listener_; |
| 100 uint32_t texture_id_; | 99 uint32_t texture_id_; |
| 101 | 100 |
| 102 base::WeakPtrFactory<StreamTexture> weak_factory_; | 101 base::WeakPtrFactory<StreamTexture> weak_factory_; |
| 103 DISALLOW_COPY_AND_ASSIGN(StreamTexture); | 102 DISALLOW_COPY_AND_ASSIGN(StreamTexture); |
| 104 }; | 103 }; |
| 105 | 104 |
| 106 } // namespace gpu | 105 } // namespace gpu |
| 107 | 106 |
| 108 #endif // GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ | 107 #endif // GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ |
| OLD | NEW |