#include "third_party/skia/include/core/SkBitmapDevice.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/skia_util.h"
+#include "ui/gfx/vsync_provider.h"
namespace cc {
SoftwareOutputDevice::~SoftwareOutputDevice() {}
-void SoftwareOutputDevice::Resize(gfx::Size viewport_size) {
+void SoftwareOutputDevice::Resize(const gfx::Size& viewport_size) {
if (viewport_size_ == viewport_size)
return;
canvas_ = skia::AdoptRef(new SkCanvas(device_.get()));
}
-SkCanvas* SoftwareOutputDevice::BeginPaint(gfx::Rect damage_rect) {
+SkCanvas* SoftwareOutputDevice::BeginPaint(const gfx::Rect& damage_rect) {
DCHECK(device_);
damage_rect_ = damage_rect;
return canvas_.get();
}
void SoftwareOutputDevice::CopyToBitmap(
- gfx::Rect rect, SkBitmap* output) {
+ const gfx::Rect& rect, SkBitmap* output) {
DCHECK(device_);
const SkBitmap& bitmap = device_->accessBitmap(false);
bitmap.extractSubset(output, gfx::RectToSkIRect(rect));
}
-void SoftwareOutputDevice::Scroll(
- gfx::Vector2d delta, gfx::Rect clip_rect) {
+void SoftwareOutputDevice::Scroll(const gfx::Vector2d& delta,
+ const gfx::Rect& clip_rect) {
NOTIMPLEMENTED();
}
NOTIMPLEMENTED();
}
+gfx::VSyncProvider* SoftwareOutputDevice::GetVSyncProvider() {
+ return vsync_provider_.get();
+}
+
} // namespace cc