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

Side by Side Diff: media/tools/shader_bench/window.h

Issue 4873002: Benchmark tool for GPU-accelerated video rendering (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 10 years 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
« no previous file with comments | « media/tools/shader_bench/shader_bench.cc ('k') | media/tools/shader_bench/window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_TOOLS_SHADER_BENCH_WINDOW_H_
6 #define MEDIA_TOOLS_SHADER_BENCH_WINDOW_H_
7
8 #include "gfx/native_widget_types.h"
9
10 class Painter;
11 class Task;
12
13 namespace media {
14
15 class Window {
16 public:
17 Window(int width, int height);
18
19 // Creates and returns a handle to a native window of the given dimensions.
20 gfx::NativeWindow CreateNativeWindow(int width, int height);
21
22 // Returns the NPAPI plugin window handle of the window.
23 gfx::PluginWindowHandle PluginWindow();
24
25 // Kicks off frame painting with the given limit, painter, and
26 // callback to run when painting task is complete.
27 void Start(int limit, Task* done_task, Painter* painter);
28
29 // Called when window is expected to paint self.
30 void OnPaint();
31
32 // Main loop for window.
33 void MainLoop();
34
35 private:
36 // Task to run when frame painting is completed. Will be deleted after
37 // running.
38 Task* done_task_;
39
40 // Reference to painter Window uses to paint frames.
41 Painter* painter_;
42
43 // Number of frames to paint before closing the window.
44 int limit_;
45
46 // Number of frames currently painted.
47 int count_;
48
49 // True if the window is painting video frames to the screen, false otherwise.
50 bool running_;
51
52 // This window's native handle.
53 gfx::NativeWindow window_handle_;
54
55 DISALLOW_COPY_AND_ASSIGN(Window);
56 };
57
58 } // namespace media
59
60 #endif // MEDIA_TOOLS_SHADER_BENCH_WINDOW_H_
OLDNEW
« no previous file with comments | « media/tools/shader_bench/shader_bench.cc ('k') | media/tools/shader_bench/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698