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

Unified Diff: ui/base/cursor/cursor_util.cc

Issue 1917083002: Move gfx::Display/Screen to display::Display/Screen in ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/base/cursor/cursor_util.h ('k') | ui/base/cursor/image_cursors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cursor/cursor_util.cc
diff --git a/ui/base/cursor/cursor_util.cc b/ui/base/cursor/cursor_util.cc
index 0e1d36e5838fb0b6ffcb06e6fe75b1571f13bd0f..6aee6b564cb7a527e220c59a3cc90a3cd26c97b3 100644
--- a/ui/base/cursor/cursor_util.cc
+++ b/ui/base/cursor/cursor_util.cc
@@ -40,33 +40,33 @@ bool ConvertSkBitmapAlphaType(SkBitmap* bitmap, SkAlphaType alpha_type) {
} // namespace
void ScaleAndRotateCursorBitmapAndHotpoint(float scale,
- gfx::Display::Rotation rotation,
+ display::Display::Rotation rotation,
SkBitmap* bitmap,
gfx::Point* hotpoint) {
// SkBitmapOperations::Rotate() needs the bitmap to have premultiplied alpha,
// so convert bitmap alpha type if we are going to rotate.
bool was_converted = false;
- if (rotation != gfx::Display::ROTATE_0 &&
+ if (rotation != display::Display::ROTATE_0 &&
bitmap->info().alphaType() == kUnpremul_SkAlphaType) {
ConvertSkBitmapAlphaType(bitmap, kPremul_SkAlphaType);
was_converted = true;
}
switch (rotation) {
- case gfx::Display::ROTATE_0:
+ case display::Display::ROTATE_0:
break;
- case gfx::Display::ROTATE_90:
+ case display::Display::ROTATE_90:
hotpoint->SetPoint(bitmap->height() - hotpoint->y(), hotpoint->x());
*bitmap = SkBitmapOperations::Rotate(
*bitmap, SkBitmapOperations::ROTATION_90_CW);
break;
- case gfx::Display::ROTATE_180:
+ case display::Display::ROTATE_180:
hotpoint->SetPoint(
bitmap->width() - hotpoint->x(), bitmap->height() - hotpoint->y());
*bitmap = SkBitmapOperations::Rotate(
*bitmap, SkBitmapOperations::ROTATION_180_CW);
break;
- case gfx::Display::ROTATE_270:
+ case display::Display::ROTATE_270:
hotpoint->SetPoint(hotpoint->y(), bitmap->width() - hotpoint->x());
*bitmap = SkBitmapOperations::Rotate(
*bitmap, SkBitmapOperations::ROTATION_270_CW);
@@ -98,7 +98,7 @@ void ScaleAndRotateCursorBitmapAndHotpoint(float scale,
void GetImageCursorBitmap(int resource_id,
float scale,
- gfx::Display::Rotation rotation,
+ display::Display::Rotation rotation,
gfx::Point* hotspot,
SkBitmap* bitmap) {
const gfx::ImageSkia* image =
@@ -114,7 +114,7 @@ void GetImageCursorBitmap(int resource_id,
void GetAnimatedCursorBitmaps(int resource_id,
float scale,
- gfx::Display::Rotation rotation,
+ display::Display::Rotation rotation,
gfx::Point* hotspot,
std::vector<SkBitmap>* bitmaps) {
// TODO(oshima|tdanderson): Support rotation and fractional scale factor.
« no previous file with comments | « ui/base/cursor/cursor_util.h ('k') | ui/base/cursor/image_cursors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698