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

Unified Diff: cc/software_output_device.h

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mynits Created 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/software_output_device.h
diff --git a/cc/software_output_device.h b/cc/software_output_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..18652fa1c9c25c489d015df643dd5a9f55672938
--- /dev/null
+++ b/cc/software_output_device.h
@@ -0,0 +1,31 @@
+// Copyright 2012 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 CC_SOFTWARE_OUTPUT_DEVICE_H_
+#define CC_SOFTWARE_OUTPUT_DEVICE_H_
+
+#include "ui/gfx/size.h"
+#include <public/WebImage.h>
jamesr 2012/12/04 07:06:51 do #include "third_party/WebKit/Source/Platform/c
danakj 2012/12/04 18:15:34 Oh, I was trying to avoid adding things to DEPS. S
+
+namespace cc {
+
+// This is a "tear-off" class providing software drawing support to
+// OutputSurface, such as to a platform-provided window framebuffer.
+class SoftwareOutputDevice {
+ public:
+ virtual ~SoftwareOutputDevice() {}
+
+ // Lock the framebuffer and return a pointer to a WebImage referring to its
+ // pixels. Set forWrite if you intend to change the pixels. Readback
+ // is supported whether or not forWrite is set.
+ // TODO(danakj): Switch this from WebImage to a Skia type.
+ virtual WebKit::WebImage* Lock(bool forWrite) = 0;
+ virtual void Unlock() = 0;
+
+ virtual void DidChangeViewportSize(gfx::Size) = 0;
+};
+
+} // namespace cc
+
+#endif // CC_SOFTWARE_OUTPUT_DEVICE_H_

Powered by Google App Engine
This is Rietveld 408576698