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

Unified Diff: ui/ozone/platform/dri/dri_surface.cc

Issue 249413003: ozone: dri: Composite to intermediate surface & copy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: split drisurfaceadapter definitions Created 6 years, 8 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 | « ui/ozone/platform/caca/caca_surface_factory.cc ('k') | ui/ozone/platform/dri/dri_surface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_surface.cc
diff --git a/ui/ozone/platform/dri/dri_surface.cc b/ui/ozone/platform/dri/dri_surface.cc
index 77852b26554d24c829884887b84385234092dac6..6b296cc2a7ed32a1faca1cb3b9faef28993525e9 100644
--- a/ui/ozone/platform/dri/dri_surface.cc
+++ b/ui/ozone/platform/dri/dri_surface.cc
@@ -18,30 +18,6 @@
namespace ui {
-namespace {
-
-// TODO(dnicoara) Remove this once Skia implements this between 2 SkCanvases.
-void CopyRect(DriBuffer* dst, DriBuffer* src, const gfx::Rect& damage) {
- SkImageInfo src_info, dst_info;
- size_t src_stride, dst_stride;
- uint8_t* src_pixels = static_cast<uint8_t*>(
- const_cast<void*>(src->canvas()->peekPixels(&src_info, &src_stride)));
- uint8_t* dst_pixels = static_cast<uint8_t*>(
- const_cast<void*>(dst->canvas()->peekPixels(&dst_info, &dst_stride)));
-
- // The 2 buffers should have the same properties.
- DCHECK(src_info == dst_info);
- DCHECK(src_stride == dst_stride);
-
- int bpp = src_info.bytesPerPixel();
- for (int height = damage.y(); height < damage.y() + damage.height(); ++height)
- memcpy(dst_pixels + height * dst_stride + damage.x() * bpp,
- src_pixels + height * src_stride + damage.x() * bpp,
- damage.width() * bpp);
-}
-
-} // namespace
-
DriSurface::DriSurface(
DriWrapper* dri, const gfx::Size& size)
: dri_(dri),
@@ -88,10 +64,6 @@ void DriSurface::SwapBuffers() {
// Update our front buffer pointer.
front_buffer_ ^= 1;
-
- SkIRect device_damage;
- frontbuffer()->canvas()->getClipDeviceBounds(&device_damage);
- CopyRect(backbuffer(), frontbuffer(), gfx::SkIRectToRect(device_damage));
}
SkCanvas* DriSurface::GetDrawableForWidget() {
« no previous file with comments | « ui/ozone/platform/caca/caca_surface_factory.cc ('k') | ui/ozone/platform/dri/dri_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698