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

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

Issue 832953002: Cleanup: Update the path to gfx size headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 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
« no previous file with comments | « ui/gfx/image/image_mac.mm ('k') | ui/gfx/image/image_skia.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 #include "ui/gfx/image/image_png_rep.h" 5 #include "ui/gfx/image/image_png_rep.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "ui/gfx/codec/png_codec.h" 9 #include "ui/gfx/codec/png_codec.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/geometry/size.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 13
14 ImagePNGRep::ImagePNGRep() 14 ImagePNGRep::ImagePNGRep()
15 : raw_data(NULL), 15 : raw_data(NULL),
16 scale(1.0) { 16 scale(1.0) {
17 } 17 }
18 18
19 ImagePNGRep::ImagePNGRep(const scoped_refptr<base::RefCountedMemory>& data, 19 ImagePNGRep::ImagePNGRep(const scoped_refptr<base::RefCountedMemory>& data,
20 float data_scale) 20 float data_scale)
(...skipping 11 matching lines...) Expand all
32 SkBitmap bitmap; 32 SkBitmap bitmap;
33 if (!gfx::PNGCodec::Decode(raw_data->front(), raw_data->size(), 33 if (!gfx::PNGCodec::Decode(raw_data->front(), raw_data->size(),
34 &bitmap)) { 34 &bitmap)) {
35 LOG(ERROR) << "Unable to decode PNG."; 35 LOG(ERROR) << "Unable to decode PNG.";
36 return gfx::Size(0, 0); 36 return gfx::Size(0, 0);
37 } 37 }
38 return gfx::Size(bitmap.width(), bitmap.height()); 38 return gfx::Size(bitmap.width(), bitmap.height());
39 } 39 }
40 40
41 } // namespace gfx 41 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/image/image_mac.mm ('k') | ui/gfx/image/image_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698