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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 void OnFrameAvailable(); | 74 void OnFrameAvailable(); |
75 | 75 |
76 // IPC::Listener implementation: | 76 // IPC::Listener implementation: |
77 bool OnMessageReceived(const IPC::Message& message) override; | 77 bool OnMessageReceived(const IPC::Message& message) override; |
78 | 78 |
79 // IPC message handlers: | 79 // IPC message handlers: |
80 void OnStartListening(); | 80 void OnStartListening(); |
81 void OnEstablishPeer(int32_t primary_id, int32_t secondary_id); | 81 void OnEstablishPeer(int32_t primary_id, int32_t secondary_id); |
82 void OnSetSize(const gfx::Size& size) { size_ = size; } | 82 void OnSetSize(const gfx::Size& size) { size_ = size; } |
83 | 83 |
| 84 void Flush() override {} |
| 85 |
84 scoped_refptr<gl::SurfaceTexture> surface_texture_; | 86 scoped_refptr<gl::SurfaceTexture> surface_texture_; |
85 | 87 |
86 // Current transform matrix of the surface texture. | 88 // Current transform matrix of the surface texture. |
87 float current_matrix_[16]; | 89 float current_matrix_[16]; |
88 | 90 |
89 // Current size of the surface texture. | 91 // Current size of the surface texture. |
90 gfx::Size size_; | 92 gfx::Size size_; |
91 | 93 |
92 // Whether a new frame is available that we should update to. | 94 // Whether a new frame is available that we should update to. |
93 bool has_pending_frame_; | 95 bool has_pending_frame_; |
(...skipping 10 matching lines...) Expand all Loading... |
104 unsigned vertex_buffer_; | 106 unsigned vertex_buffer_; |
105 int u_xform_location_; | 107 int u_xform_location_; |
106 | 108 |
107 base::WeakPtrFactory<StreamTexture> weak_factory_; | 109 base::WeakPtrFactory<StreamTexture> weak_factory_; |
108 DISALLOW_COPY_AND_ASSIGN(StreamTexture); | 110 DISALLOW_COPY_AND_ASSIGN(StreamTexture); |
109 }; | 111 }; |
110 | 112 |
111 } // namespace gpu | 113 } // namespace gpu |
112 | 114 |
113 #endif // GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ | 115 #endif // GPU_IPC_SERVICE_STREAM_TEXTURE_ANDROID_H_ |
OLD | NEW |