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

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

Issue 16907002: Update Android to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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/common/gpu/client/gpu_channel_host.h" 7 #include "content/common/gpu/client/gpu_channel_host.h"
8 #include "content/common/gpu/gpu_messages.h" 8 #include "content/common/gpu/gpu_messages.h"
9 #include "content/renderer/render_thread_impl.h" 9 #include "content/renderer/render_thread_impl.h"
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 OnFrameAvailable); 46 OnFrameAvailable);
47 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_MatrixChanged, 47 IPC_MESSAGE_HANDLER(GpuStreamTextureMsg_MatrixChanged,
48 OnMatrixChanged); 48 OnMatrixChanged);
49 IPC_MESSAGE_UNHANDLED(handled = false) 49 IPC_MESSAGE_UNHANDLED(handled = false)
50 IPC_END_MESSAGE_MAP() 50 IPC_END_MESSAGE_MAP()
51 DCHECK(handled); 51 DCHECK(handled);
52 return handled; 52 return handled;
53 } 53 }
54 54
55 void StreamTextureHost::EstablishPeer(int32 primary_id, int32 secondary_id) { 55 void StreamTextureHost::EstablishPeer(int32 primary_id, int32 secondary_id) {
56 if (channel_) { 56 if (channel_.get()) {
57 channel_->Send(new GpuChannelMsg_EstablishStreamTexture( 57 channel_->Send(new GpuChannelMsg_EstablishStreamTexture(
58 stream_id_, primary_id, secondary_id)); 58 stream_id_, primary_id, secondary_id));
59 } 59 }
60 } 60 }
61 void StreamTextureHost::OnChannelError() { 61 void StreamTextureHost::OnChannelError() {
62 } 62 }
63 63
64 void StreamTextureHost::OnFrameAvailable() { 64 void StreamTextureHost::OnFrameAvailable() {
65 if (listener_) 65 if (listener_)
66 listener_->OnFrameAvailable(); 66 listener_->OnFrameAvailable();
67 } 67 }
68 68
69 void StreamTextureHost::OnMatrixChanged( 69 void StreamTextureHost::OnMatrixChanged(
70 const GpuStreamTextureMsg_MatrixChanged_Params& params) { 70 const GpuStreamTextureMsg_MatrixChanged_Params& params) {
71 COMPILE_ASSERT(sizeof(params) == sizeof(float) * 16, 71 COMPILE_ASSERT(sizeof(params) == sizeof(float) * 16,
72 bad_GpuStreamTextureMsg_MatrixChanged_Params_format); 72 bad_GpuStreamTextureMsg_MatrixChanged_Params_format);
73 if (listener_) 73 if (listener_)
74 listener_->OnMatrixChanged((const float*)&params); 74 listener_->OnMatrixChanged((const float*)&params);
75 } 75 }
76 76
77 } // namespace content 77 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698