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

Unified Diff: ui/gfx/canvas.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/canvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas.cc
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index 47347f3cea0227718765c252ebfa1e5aa0d0ca3d..d9f66426c5f0c429f7a03703eda1f313038e00a1 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -103,17 +103,6 @@ int Canvas::DefaultCanvasTextAlignment() {
return base::i18n::IsRTL() ? TEXT_ALIGN_RIGHT : TEXT_ALIGN_LEFT;
}
-ImageSkiaRep Canvas::ExtractImageRep() const {
- DCHECK(bitmap_);
- SkBitmap bitmap_copy;
- // copyTo() will perform a deep copy, which is what we want.
- bool result = bitmap_->copyTo(&bitmap_copy);
- // This should succeed since the destination bitmap is empty to begin with.
- // The only failure is an allocation failure, which we want to DCHECK anyway.
- DCHECK(result);
- return ImageSkiaRep(bitmap_copy, image_scale_);
-}
-
void Canvas::DrawDashedRect(const RectF& rect, SkColor color) {
if (rect.IsEmpty())
return;
« no previous file with comments | « ui/gfx/canvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698