summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlionel.g.landwerlin <lionel.g.landwerlin@intel.com>2014-11-26 02:56:42 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-26 10:57:15 +0000
commit17549a260485cec22652b3edb4f8a63f35769fa4 (patch)
treeb7d1c7dcc0b12bb21792c6a859467b14cdfcfbbf
parent214620e444390c1442a62d79499a82562ebe492d (diff)
downloadchromium_src-17549a260485cec22652b3edb4f8a63f35769fa4.zip
chromium_src-17549a260485cec22652b3edb4f8a63f35769fa4.tar.gz
chromium_src-17549a260485cec22652b3edb4f8a63f35769fa4.tar.bz2
ozone: don't resend cursor bitmaps for every cursor movement
TEST=none BUG=436433 Review URL: https://codereview.chromium.org/758883003 Cr-Commit-Position: refs/heads/master@{#305797}
-rw-r--r--ui/aura/window_tree_host_ozone.cc5
-rw-r--r--ui/aura/window_tree_host_ozone.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/ui/aura/window_tree_host_ozone.cc b/ui/aura/window_tree_host_ozone.cc
index b400962..790ba91 100644
--- a/ui/aura/window_tree_host_ozone.cc
+++ b/ui/aura/window_tree_host_ozone.cc
@@ -11,7 +11,7 @@
namespace aura {
WindowTreeHostOzone::WindowTreeHostOzone(const gfx::Rect& bounds)
- : widget_(gfx::kNullAcceleratedWidget) {
+ : widget_(gfx::kNullAcceleratedWidget), current_cursor_(ui::kCursorNull) {
platform_window_ =
ui::OzonePlatform::GetInstance()->CreatePlatformWindow(this, bounds);
}
@@ -94,6 +94,9 @@ void WindowTreeHostOzone::ReleaseCapture() {
}
void WindowTreeHostOzone::SetCursorNative(gfx::NativeCursor cursor) {
+ if (cursor == current_cursor_)
+ return;
+ current_cursor_ = cursor;
platform_window_->SetCursor(cursor.platform());
}
diff --git a/ui/aura/window_tree_host_ozone.h b/ui/aura/window_tree_host_ozone.h
index 52d7ca8..296b14f 100644
--- a/ui/aura/window_tree_host_ozone.h
+++ b/ui/aura/window_tree_host_ozone.h
@@ -60,6 +60,9 @@ class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost,
// The identifier used to create a compositing surface.
gfx::AcceleratedWidget widget_;
+ // Current Aura cursor.
+ gfx::NativeCursor current_cursor_;
+
DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone);
};