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

Unified Diff: cc/software_output_device_impl.h

Issue 11967033: [CLOSED] In-browser software compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the lack SkCanvas::clear scissoring. Created 7 years, 11 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
« no previous file with comments | « cc/software_output_device.h ('k') | cc/software_output_device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/software_output_device_impl.h
diff --git a/cc/software_output_device_impl.h b/cc/software_output_device_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..7e0e050971ca537fbfb9d0411664d51fb18af0df
--- /dev/null
+++ b/cc/software_output_device_impl.h
@@ -0,0 +1,42 @@
+// 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 CC_SOFTWARE_OUTPUT_DEVICE_IMPL_H_
+#define CC_SOFTWARE_OUTPUT_DEVICE_IMPL_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "cc/cc_export.h"
+#include "cc/software_output_device.h"
+#include "skia/ext/refptr.h"
+
+class SkCanvas;
+class SkDevice;
+
+namespace cc {
+
+class CC_EXPORT SoftwareOutputDeviceImpl : public SoftwareOutputDevice {
+ public:
+
+ SoftwareOutputDeviceImpl();
+ virtual ~SoftwareOutputDeviceImpl();
+
+ // SoftwareOutputDevice implementation
+ virtual void Resize(const gfx::Size& size) OVERRIDE;
+
+ virtual SkCanvas* BeginPaint() OVERRIDE;
+ virtual void EndPaint(const gfx::Rect& damage_rect) OVERRIDE;
+
+ virtual void CopyToBitmap(const gfx::Rect& rect, SkBitmap* output) OVERRIDE;
+ virtual void Scroll(const gfx::Vector2d& delta,
+ const gfx::Rect& clip_rect) OVERRIDE;
+
+protected:
+ gfx::Size viewport_size_;
+ skia::RefPtr<SkDevice> device_;
+ skia::RefPtr<SkCanvas> canvas_;
+};
+
+} // namespace cc
+
+#endif // CC_SOFTWARE_OUTPUT_DEVICE_IMPL_H_
« no previous file with comments | « cc/software_output_device.h ('k') | cc/software_output_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698