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

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

Issue 11087093: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Should pass trybots this time Created 8 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
« no previous file with comments | « ui/gfx/canvas.h ('k') | ui/gfx/interpolated_transform.h » ('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 #include "ui/gfx/canvas.h" 5 #include "ui/gfx/canvas.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } 482 }
483 483
484 gfx::NativeDrawingContext Canvas::BeginPlatformPaint() { 484 gfx::NativeDrawingContext Canvas::BeginPlatformPaint() {
485 return skia::BeginPlatformPaint(canvas_); 485 return skia::BeginPlatformPaint(canvas_);
486 } 486 }
487 487
488 void Canvas::EndPlatformPaint() { 488 void Canvas::EndPlatformPaint() {
489 skia::EndPlatformPaint(canvas_); 489 skia::EndPlatformPaint(canvas_);
490 } 490 }
491 491
492 void Canvas::Transform(const ui::Transform& transform) { 492 void Canvas::Transform(const gfx::Transform& transform) {
493 canvas_->concat(transform.matrix()); 493 canvas_->concat(transform.matrix());
494 } 494 }
495 495
496 Canvas::Canvas(SkCanvas* canvas, ui::ScaleFactor scale_factor) 496 Canvas::Canvas(SkCanvas* canvas, ui::ScaleFactor scale_factor)
497 : scale_factor_(scale_factor), 497 : scale_factor_(scale_factor),
498 owned_canvas_(), 498 owned_canvas_(),
499 canvas_(canvas) { 499 canvas_(canvas) {
500 DCHECK(canvas); 500 DCHECK(canvas);
501 } 501 }
502 502
(...skipping 29 matching lines...) Expand all
532 532
533 float bitmap_scale = image_rep.GetScale(); 533 float bitmap_scale = image_rep.GetScale();
534 if (scale_x < bitmap_scale || scale_y < bitmap_scale) 534 if (scale_x < bitmap_scale || scale_y < bitmap_scale)
535 const_cast<SkBitmap&>(image_rep.sk_bitmap()).buildMipMap(); 535 const_cast<SkBitmap&>(image_rep.sk_bitmap()).buildMipMap();
536 } 536 }
537 537
538 return image_rep; 538 return image_rep;
539 } 539 }
540 540
541 } // namespace gfx 541 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/canvas.h ('k') | ui/gfx/interpolated_transform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698