Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: content/renderer/gpu/stream_texture_host_android.cc

Issue 1746983002: Make Android StreamTexture implement GLStreamTextureImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't remove the default stream texture matrix from cc/layers Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/gpu/stream_texture_host_android.h" 5 #include "content/renderer/gpu/stream_texture_host_android.h"
6 6
7 #include "content/renderer/render_thread_impl.h" 7 #include "content/renderer/render_thread_impl.h"
8 #include "gpu/ipc/client/gpu_channel_host.h" 8 #include "gpu/ipc/client/gpu_channel_host.h"
9 #include "gpu/ipc/common/gpu_messages.h" 9 #include "gpu/ipc/common/gpu_messages.h"
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 return false; 37 return false;
38 } 38 }
39 39
40 bool StreamTextureHost::OnMessageReceived(const IPC::Message& message) { 40 bool StreamTextureHost::OnMessageReceived(const IPC::Message& message) {
41 bool handled = true; 41 bool handled = true;
42 IPC_BEGIN_MESSAGE_MAP(StreamTextureHost, message) 42 IPC_BEGIN_MESSAGE_MAP(StreamTextureHost, message)
43 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_FrameAvailable, 43 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_FrameAvailable,
44 OnFrameAvailable); 44 OnFrameAvailable);
45 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_MatrixChanged,
46 OnMatrixChanged);
47 IPC_MESSAGE_UNHANDLED(handled = false) 45 IPC_MESSAGE_UNHANDLED(handled = false)
48 IPC_END_MESSAGE_MAP() 46 IPC_END_MESSAGE_MAP()
49 DCHECK(handled); 47 DCHECK(handled);
50 return handled; 48 return handled;
51 } 49 }
52 50
53 void StreamTextureHost::OnChannelError() { 51 void StreamTextureHost::OnChannelError() {
54 } 52 }
55 53
56 void StreamTextureHost::OnFrameAvailable() { 54 void StreamTextureHost::OnFrameAvailable() {
57 if (listener_) 55 if (listener_)
58 listener_->OnFrameAvailable(); 56 listener_->OnFrameAvailable();
59 } 57 }
60 58
61 void StreamTextureHost::OnMatrixChanged(
62 const GpuStreamTextureMsg_MatrixChanged_Params& params) {
63 static_assert(sizeof(params) == sizeof(float) * 16,
64 "bad GpuStreamTextureMsg MatrixChanged_Params format");
65 if (listener_)
66 listener_->OnMatrixChanged((const float*)&params);
67 }
68
69 } // namespace content 59 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/stream_texture_host_android.h ('k') | content/renderer/media/android/stream_texture_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698