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

Side by Side Diff: ui/gfx/image/canvas_image_source.h

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/color_analysis_unittest.cc ('k') | ui/gfx/image/canvas_image_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_IMAGE_CANVAS_IMAGE_SOURCE_H_ 5 #ifndef UI_GFX_IMAGE_CANVAS_IMAGE_SOURCE_H_
6 #define UI_GFX_IMAGE_CANVAS_IMAGE_SOURCE_H_ 6 #define UI_GFX_IMAGE_CANVAS_IMAGE_SOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/gfx/gfx_export.h" 10 #include "ui/gfx/gfx_export.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 CanvasImageSource(const gfx::Size& size, bool is_opaque); 24 CanvasImageSource(const gfx::Size& size, bool is_opaque);
25 25
26 // Called when a new image needs to be drawn for a scale factor. 26 // Called when a new image needs to be drawn for a scale factor.
27 virtual void Draw(gfx::Canvas* canvas) = 0; 27 virtual void Draw(gfx::Canvas* canvas) = 0;
28 28
29 // Returns the size of images in DIP that this source will generate. 29 // Returns the size of images in DIP that this source will generate.
30 const gfx::Size& size() const { return size_; }; 30 const gfx::Size& size() const { return size_; };
31 31
32 // Overridden from gfx::ImageSkiaSource. 32 // Overridden from gfx::ImageSkiaSource.
33 virtual gfx::ImageSkiaRep GetImageForScale( 33 virtual gfx::ImageSkiaRep GetImageForScale(float scale) OVERRIDE;
34 ui::ScaleFactor scale_factor) OVERRIDE;
35 34
36 protected: 35 protected:
37 virtual ~CanvasImageSource() {} 36 virtual ~CanvasImageSource() {}
38 37
39 const gfx::Size size_; 38 const gfx::Size size_;
40 const bool is_opaque_; 39 const bool is_opaque_;
41 DISALLOW_COPY_AND_ASSIGN(CanvasImageSource); 40 DISALLOW_COPY_AND_ASSIGN(CanvasImageSource);
42 }; 41 };
43 42
44 } // namespace gfx 43 } // namespace gfx
45 44
46 #endif // UI_GFX_IMAGE_CANVAS_IMAGE_SOURCE_H_ 45 #endif // UI_GFX_IMAGE_CANVAS_IMAGE_SOURCE_H_
OLDNEW
« no previous file with comments | « ui/gfx/color_analysis_unittest.cc ('k') | ui/gfx/image/canvas_image_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698