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

Unified Diff: content/browser/renderer_host/software_output_device.h

Issue 12340015: [CLOSED] Big patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
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);
+
+ 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_

Powered by Google App Engine
This is Rietveld 408576698