 Chromium Code Reviews
 Chromium Code Reviews Issue 4873002:
  Benchmark tool for GPU-accelerated video rendering  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 4873002:
  Benchmark tool for GPU-accelerated video rendering  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| OLD | NEW | 
|---|---|
| (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 | |
| 
scherkus (not reviewing)
2010/11/30 23:36:10
dtor?
 
vrk (LEFT CHROMIUM)
2010/12/01 02:46:11
Talked about it, don't think it's needed in this c
 | |
| 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 virtual void Start(int limit, Task* done_task, Painter* painter); | |
| 28 | |
| 29 // Called when window is expected to paint self. | |
| 30 virtual void OnPaint(); | |
| 31 | |
| 32 // Main loop for window. | |
| 33 virtual void MainLoop(); | |
| 34 | |
| 35 protected: | |
| 
scherkus (not reviewing)
2010/11/30 23:36:10
bit confused... I don't think anyone inherits from
 
vrk (LEFT CHROMIUM)
2010/12/01 02:46:11
Yup, sorry! When I first wrote the class I was goi
 | |
| 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 private: | |
| 56 DISALLOW_COPY_AND_ASSIGN(Window); | |
| 57 }; | |
| 58 | |
| 59 } // namespace media | |
| 60 | |
| 61 #endif // MEDIA_TOOLS_SHADER_BENCH_WINDOW_H_ | |
| OLD | NEW |