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

Unified Diff: ui/gfx/skia_paint_util.h

Issue 2661353002: ui/gfx: split out code that depends on paint (Closed)
Patch Set: Fix mac, chromeos build Created 3 years, 11 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/gfx/shadow_util.cc ('k') | ui/gfx/skia_paint_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skia_paint_util.h
diff --git a/ui/gfx/skia_util.h b/ui/gfx/skia_paint_util.h
similarity index 52%
copy from ui/gfx/skia_util.h
copy to ui/gfx/skia_paint_util.h
index fbd1909c06831346079d252c2e673f2d5b6d6d6b..2ec10ff621c4ecc742b24a978c5d07d9f2b7ca9d 100644
--- a/ui/gfx/skia_util.h
+++ b/ui/gfx/skia_paint_util.h
@@ -1,50 +1,22 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_GFX_SKIA_UTIL_H_
-#define UI_GFX_SKIA_UTIL_H_
+#ifndef UI_GFX_SKIA_PAINT_UTIL_H_
+#define UI_GFX_SKIA_PAINT_UTIL_H_
-#include <string>
#include <vector>
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkRect.h"
#include "third_party/skia/include/core/SkShader.h"
-#include "ui/gfx/geometry/quad_f.h"
-#include "ui/gfx/geometry/size.h"
#include "ui/gfx/gfx_export.h"
+#include "ui/gfx/shadow_value.h"
-class SkBitmap;
class SkDrawLooper;
+class SkMatrix;
namespace gfx {
class ImageSkiaRep;
-class Point;
-class PointF;
-class Rect;
-class RectF;
-class ShadowValue;
-class Transform;
-
-// Convert between Skia and gfx types.
-GFX_EXPORT SkPoint PointToSkPoint(const Point& point);
-GFX_EXPORT SkIPoint PointToSkIPoint(const Point& point);
-GFX_EXPORT SkPoint PointFToSkPoint(const PointF& point);
-GFX_EXPORT SkRect RectToSkRect(const Rect& rect);
-GFX_EXPORT SkIRect RectToSkIRect(const Rect& rect);
-GFX_EXPORT Rect SkIRectToRect(const SkIRect& rect);
-GFX_EXPORT SkRect RectFToSkRect(const RectF& rect);
-GFX_EXPORT RectF SkRectToRectF(const SkRect& rect);
-GFX_EXPORT SkSize SizeFToSkSize(const SizeF& size);
-GFX_EXPORT SizeF SkSizeToSizeF(const SkSize& size);
-GFX_EXPORT Size SkISizeToSize(const SkISize& size);
-
-GFX_EXPORT void QuadFToSkPoints(const gfx::QuadF& quad, SkPoint points[4]);
-
-GFX_EXPORT void TransformToFlattenedSkMatrix(const gfx::Transform& transform,
- SkMatrix* flattened);
// Creates a bitmap shader for the image rep with the image rep's scale factor.
// Sets the created shader's local matrix such that it displays the image rep at
@@ -86,24 +58,6 @@ GFX_EXPORT sk_sp<SkDrawLooper> CreateShadowDrawLooper(
GFX_EXPORT sk_sp<SkDrawLooper> CreateShadowDrawLooperCorrectBlur(
const std::vector<ShadowValue>& shadows);
-// Returns true if the two bitmaps contain the same pixels.
-GFX_EXPORT bool BitmapsAreEqual(const SkBitmap& bitmap1,
- const SkBitmap& bitmap2);
-
-// Converts Skia ARGB format pixels in |skia| to RGBA.
-GFX_EXPORT void ConvertSkiaToRGBA(const unsigned char* skia,
- int pixel_width,
- unsigned char* rgba);
-
-// Converts a Skia floating-point value to an int appropriate for hb_position_t.
-GFX_EXPORT int SkiaScalarToHarfBuzzUnits(SkScalar value);
-
-// Converts an hb_position_t to a Skia floating-point value.
-GFX_EXPORT SkScalar HarfBuzzUnitsToSkiaScalar(int value);
-
-// Converts an hb_position_t to a float.
-GFX_EXPORT float HarfBuzzUnitsToFloat(int value);
-
} // namespace gfx
#endif // UI_GFX_SKIA_UTIL_H_
« no previous file with comments | « ui/gfx/shadow_util.cc ('k') | ui/gfx/skia_paint_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698