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

Side by Side Diff: ui/gfx/image/image_skia_rep.cc

Issue 11910005: Add additional error handling and null checking to ImageSkiaOperations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_tests failures Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/image/image_skia_rep.h ('k') | no next file » | 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/image/image_skia_rep.h" 5 #include "ui/gfx/image/image_skia_rep.h"
6 6
7 #include "ui/gfx/size.h"
8
9 namespace gfx { 7 namespace gfx {
10 8
11 ImageSkiaRep::ImageSkiaRep() 9 ImageSkiaRep::ImageSkiaRep()
12 : scale_factor_(ui::SCALE_FACTOR_NONE) { 10 : scale_factor_(ui::SCALE_FACTOR_NONE) {
13 } 11 }
14 12
15 ImageSkiaRep::~ImageSkiaRep() { 13 ImageSkiaRep::~ImageSkiaRep() {
16 } 14 }
17 15
18 ImageSkiaRep::ImageSkiaRep(const gfx::Size& size, 16 ImageSkiaRep::ImageSkiaRep(const gfx::Size& size,
(...skipping 20 matching lines...) Expand all
39 int ImageSkiaRep::GetHeight() const { 37 int ImageSkiaRep::GetHeight() const {
40 return static_cast<int>(bitmap_.height() / 38 return static_cast<int>(bitmap_.height() /
41 ui::GetScaleFactorScale(scale_factor_)); 39 ui::GetScaleFactorScale(scale_factor_));
42 } 40 }
43 41
44 float ImageSkiaRep::GetScale() const { 42 float ImageSkiaRep::GetScale() const {
45 return ui::GetScaleFactorScale(scale_factor_); 43 return ui::GetScaleFactorScale(scale_factor_);
46 } 44 }
47 45
48 } // namespace gfx 46 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/image/image_skia_rep.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698