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

Unified Diff: ui/gfx/image/image_skia_rep.h

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 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/image/image_skia_operations.cc ('k') | ui/gfx/image/image_skia_rep.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_rep.h
diff --git a/ui/gfx/image/image_skia_rep.h b/ui/gfx/image/image_skia_rep.h
deleted file mode 100644
index 47f6713acf5d0a87fddd5020badd1c05c9ad783c..0000000000000000000000000000000000000000
--- a/ui/gfx/image/image_skia_rep.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 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_IMAGE_IMAGE_SKIA_REP_H_
-#define UI_GFX_IMAGE_IMAGE_SKIA_REP_H_
-
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/gfx/gfx_export.h"
-#include "ui/gfx/size.h"
-
-namespace gfx {
-
-// An ImageSkiaRep represents a bitmap and the scale factor it is intended for.
-// 0.0f scale is used to indicate that this ImageSkiaRep is used for unscaled
-// image (the image that only returns 1.0f scale image).
-class GFX_EXPORT ImageSkiaRep {
- public:
- // Create null bitmap.
- ImageSkiaRep();
- ~ImageSkiaRep();
-
- // Note: This is for testing purpose only.
- // Creates a bitmap with kARGB_8888_Config config with given |size| in DIP.
- // This allocates pixels in the bitmap. It is guaranteed that the data in the
- // bitmap are initialized but the actual values are undefined.
- // Specifying 0 scale means the image is for unscaled image. (unscaled()
- // returns truen, and scale() returns 1.0f;)
- ImageSkiaRep(const gfx::Size& size, float scale);
-
- // Creates a bitmap with given scale.
- // Adds ref to |src|.
- ImageSkiaRep(const SkBitmap& src, float scale);
-
- // Returns true if the backing bitmap is null.
- bool is_null() const { return bitmap_.isNull(); }
-
- // Get width and height of bitmap in DIP.
- int GetWidth() const;
- int GetHeight() const;
-
- // Get width and height of bitmap in pixels.
- int pixel_width() const { return bitmap_.width(); }
- int pixel_height() const { return bitmap_.height(); }
- Size pixel_size() const {
- return Size(pixel_width(), pixel_height());
- }
-
- // Retrieves the scale that the bitmap will be painted at.
- float scale() const { return unscaled() ? 1.0f : scale_; }
-
- bool unscaled() const { return scale_ == 0.0f; }
-
- // Mark the image to be used as scaled image.
- void SetScaled();
-
- // Returns backing bitmap.
- const SkBitmap& sk_bitmap() const { return bitmap_; }
-
- private:
- friend class ImageSkia;
- SkBitmap& mutable_sk_bitmap() { return bitmap_; }
-
- SkBitmap bitmap_;
-
- float scale_;
-};
-
-} // namespace gfx
-
-#endif // UI_GFX_IMAGE_IMAGE_SKIA_REP_H_
« no previous file with comments | « ui/gfx/image/image_skia_operations.cc ('k') | ui/gfx/image/image_skia_rep.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698