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

Side by Side Diff: ui/gfx/canvas.h

Issue 2822233003: gfx: Remove Canvas::ExtractImageRep. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/gfx/canvas.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_CANVAS_H_ 5 #ifndef UI_GFX_CANVAS_H_
6 #define UI_GFX_CANVAS_H_ 6 #define UI_GFX_CANVAS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 // Returns the default text alignment to be used when drawing text on a 141 // Returns the default text alignment to be used when drawing text on a
142 // Canvas based on the directionality of the system locale language. 142 // Canvas based on the directionality of the system locale language.
143 // This function is used by Canvas::DrawStringRect when the text alignment 143 // This function is used by Canvas::DrawStringRect when the text alignment
144 // is not specified. 144 // is not specified.
145 // 145 //
146 // This function returns either Canvas::TEXT_ALIGN_LEFT or 146 // This function returns either Canvas::TEXT_ALIGN_LEFT or
147 // Canvas::TEXT_ALIGN_RIGHT. 147 // Canvas::TEXT_ALIGN_RIGHT.
148 static int DefaultCanvasTextAlignment(); 148 static int DefaultCanvasTextAlignment();
149 149
150 // Extracts an ImageSkiaRep from the contents of this canvas.
151 ImageSkiaRep ExtractImageRep() const;
152
153 // Draws a dashed rectangle of the specified color. 150 // Draws a dashed rectangle of the specified color.
154 void DrawDashedRect(const RectF& rect, SkColor color); 151 void DrawDashedRect(const RectF& rect, SkColor color);
155 152
156 // Unscales by the image scale factor (aka device scale factor), and returns 153 // Unscales by the image scale factor (aka device scale factor), and returns
157 // that factor. This is useful when callers want to draw directly in the 154 // that factor. This is useful when callers want to draw directly in the
158 // native scale. 155 // native scale.
159 float UndoDeviceScaleFactor(); 156 float UndoDeviceScaleFactor();
160 157
161 // Saves a copy of the drawing state onto a stack, operating on this copy 158 // Saves a copy of the drawing state onto a stack, operating on this copy
162 // until a balanced call to Restore() is made. 159 // until a balanced call to Restore() is made.
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 base::Optional<SkBitmap> bitmap_; 466 base::Optional<SkBitmap> bitmap_;
470 base::Optional<cc::SkiaPaintCanvas> owned_canvas_; 467 base::Optional<cc::SkiaPaintCanvas> owned_canvas_;
471 cc::PaintCanvas* canvas_; 468 cc::PaintCanvas* canvas_;
472 469
473 DISALLOW_COPY_AND_ASSIGN(Canvas); 470 DISALLOW_COPY_AND_ASSIGN(Canvas);
474 }; 471 };
475 472
476 } // namespace gfx 473 } // namespace gfx
477 474
478 #endif // UI_GFX_CANVAS_H_ 475 #endif // UI_GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698