Chromium Code Reviews| Index: content/browser/renderer_host/software_output_device.h |
| diff --git a/content/browser/renderer_host/software_output_device.h b/content/browser/renderer_host/software_output_device.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2990e492e533b65ce641a72f6c99b4b1aa839d8a |
| --- /dev/null |
| +++ b/content/browser/renderer_host/software_output_device.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_RENDERER_HOST_SOFTWARE_OUTPUT_DEVICE_H_ |
| +#define CONTENT_BROWSER_RENDERER_HOST_SOFTWARE_OUTPUT_DEVICE_H_ |
| + |
| +#include "cc/software_output_device.h" |
| + |
| +#if defined(OS_WIN) |
| +#include <windows.h> |
| +#elif defined(USE_X11) |
| +#include "ui/base/x/x11_util.h" |
| +#endif |
| + |
| +namespace ui { |
| +class Compositor; |
| +} |
| + |
| +namespace content { |
| + |
| +class SoftwareOutputDevice : public cc::SoftwareOutputDevice { |
| + public: |
| + SoftwareOutputDevice(ui::Compositor* compositor); |
|
piman
2013/03/06 19:22:30
nit: explicit
piman
2013/03/06 19:22:30
When threaded compositing is on, This class will b
slavi
2013/03/06 21:51:20
Done
slavi
2013/03/06 21:51:20
I think it's fine not to support in-browser thread
|
| + |
| + virtual ~SoftwareOutputDevice(); |
| + |
| + virtual void Resize(const gfx::Size& viewport_size) OVERRIDE; |
| + |
| + virtual void EndPaint(cc::SoftwareFrameData* frame_data) OVERRIDE; |
| + |
| + private: |
| + ui::Compositor* compositor_; |
| + |
| +#if defined(OS_WIN) |
| + HDC hdc_; |
| + BITMAPINFOHEADER bitmap_header_; |
| +#elif defined(USE_X11) |
| + void ClearImage(); |
| + |
| + Display* display_; |
| + GC gc_; |
| + XImage* image_; |
| +#endif |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_RENDERER_HOST_SOFTWARE_OUTPUT_DEVICE_H_ |