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

Side by Side Diff: webrtc/test/win/d3d_renderer.h

Issue 1152733005: Use one scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove from BUILD.gn Created 5 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
« no previous file with comments | « webrtc/system_wrappers/system_wrappers.gyp ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #ifndef WEBRTC_VIDEO_ENGINE_TEST_COMMON_WIN_D3D_RENDERER_H_ 10 #ifndef WEBRTC_VIDEO_ENGINE_TEST_COMMON_WIN_D3D_RENDERER_H_
11 #define WEBRTC_VIDEO_ENGINE_TEST_COMMON_WIN_D3D_RENDERER_H_ 11 #define WEBRTC_VIDEO_ENGINE_TEST_COMMON_WIN_D3D_RENDERER_H_
12 12
13 #include <Windows.h> 13 #include <Windows.h>
14 #include <d3d9.h> 14 #include <d3d9.h>
15 #pragma comment(lib, "d3d9.lib") // located in DirectX SDK 15 #pragma comment(lib, "d3d9.lib") // located in DirectX SDK
16 16
17 #include "webrtc/system_wrappers/interface/scoped_refptr.h" 17 #include "webrtc/base/scoped_ref_ptr.h"
18 #include "webrtc/test/video_renderer.h" 18 #include "webrtc/test/video_renderer.h"
19 #include "webrtc/typedefs.h" 19 #include "webrtc/typedefs.h"
20 20
21 namespace webrtc { 21 namespace webrtc {
22 namespace test { 22 namespace test {
23 23
24 class D3dRenderer : public VideoRenderer { 24 class D3dRenderer : public VideoRenderer {
25 public: 25 public:
26 static D3dRenderer* Create(const char* window_title, size_t width, 26 static D3dRenderer* Create(const char* window_title, size_t width,
27 size_t height); 27 size_t height);
28 virtual ~D3dRenderer(); 28 virtual ~D3dRenderer();
29 29
30 void RenderFrame(const webrtc::VideoFrame& frame, int delta) override; 30 void RenderFrame(const webrtc::VideoFrame& frame, int delta) override;
31 bool IsTextureSupported() const override { return false; } 31 bool IsTextureSupported() const override { return false; }
32 32
33 private: 33 private:
34 D3dRenderer(size_t width, size_t height); 34 D3dRenderer(size_t width, size_t height);
35 35
36 static LRESULT WINAPI WindowProc(HWND hwnd, UINT msg, WPARAM wparam, 36 static LRESULT WINAPI WindowProc(HWND hwnd, UINT msg, WPARAM wparam,
37 LPARAM lparam); 37 LPARAM lparam);
38 bool Init(const char* window_title); 38 bool Init(const char* window_title);
39 void Resize(size_t width, size_t height); 39 void Resize(size_t width, size_t height);
40 void Destroy(); 40 void Destroy();
41 41
42 size_t width_, height_; 42 size_t width_, height_;
43 43
44 HWND hwnd_; 44 HWND hwnd_;
45 scoped_refptr<IDirect3D9> d3d_; 45 rtc::scoped_refptr<IDirect3D9> d3d_;
46 scoped_refptr<IDirect3DDevice9> d3d_device_; 46 rtc::scoped_refptr<IDirect3DDevice9> d3d_device_;
47 47
48 scoped_refptr<IDirect3DTexture9> texture_; 48 rtc::scoped_refptr<IDirect3DTexture9> texture_;
49 scoped_refptr<IDirect3DVertexBuffer9> vertex_buffer_; 49 rtc::scoped_refptr<IDirect3DVertexBuffer9> vertex_buffer_;
50 }; 50 };
51 } // namespace test 51 } // namespace test
52 } // namespace webrtc 52 } // namespace webrtc
53 53
54 #endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_WIN_D3D_RENDERER_H_ 54 #endif // WEBRTC_VIDEO_ENGINE_TEST_COMMON_WIN_D3D_RENDERER_H_
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/system_wrappers.gyp ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698