Index: content/browser/compositor/buffer_queue.cc |
diff --git a/content/browser/compositor/buffer_queue.cc b/content/browser/compositor/buffer_queue.cc |
index 8acee757ae06d0e2dd079a03501bb31cb322031c..47731db0bb1ee539e5eab3099d7b566a8030ae27 100644 |
--- a/content/browser/compositor/buffer_queue.cc |
+++ b/content/browser/compositor/buffer_queue.cc |
@@ -14,6 +14,7 @@ |
#include "third_party/skia/include/core/SkRect.h" |
#include "third_party/skia/include/core/SkRegion.h" |
#include "ui/gfx/gpu_memory_buffer.h" |
+#include "ui/gfx/skia_util.h" |
namespace content { |
@@ -63,17 +64,18 @@ void BufferQueue::CopyBufferDamage(int texture, |
int source_texture, |
const gfx::Rect& new_damage, |
const gfx::Rect& old_damage) { |
+ gfx::Rect new_damage_mutable = new_damage; |
+ gfx::Rect old_damage_mutable = old_damage; |
+#if defined(ARCH_CPU_ARM_FAMILY) |
+ // TODO(dnicoara): Remove ARM workaround once partial swap is enabled. |
+ new_damage_mutable = gfx::Rect(size_); |
+ old_damage_mutable = gfx::Rect(); |
+#endif |
+ |
gl_helper_->CopySubBufferDamage( |
- texture, |
- source_texture, |
- SkRegion(SkIRect::MakeXYWH(new_damage.x(), |
- new_damage.y(), |
- new_damage.width(), |
- new_damage.height())), |
- SkRegion(SkIRect::MakeXYWH(old_damage.x(), |
- old_damage.y(), |
- old_damage.width(), |
- old_damage.height()))); |
+ texture, source_texture, |
+ SkRegion(gfx::RectToSkIRect(new_damage_mutable)), |
+ SkRegion(gfx::RectToSkIRect(old_damage_mutable))); |
} |
void BufferQueue::UpdateBufferDamage(const gfx::Rect& damage) { |