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

Side by Side Diff: cc/layers/picture_image_layer.cc

Issue 12603013: Part 10 of cc/ directory shuffles: layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « cc/layers/picture_image_layer.h ('k') | cc/layers/picture_image_layer_impl.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 "cc/picture_image_layer.h" 5 #include "cc/layers/picture_image_layer.h"
6 6
7 #include "cc/picture_image_layer_impl.h" 7 #include "cc/layers/picture_image_layer_impl.h"
8 #include "third_party/skia/include/core/SkCanvas.h" 8 #include "third_party/skia/include/core/SkCanvas.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 scoped_refptr<PictureImageLayer> PictureImageLayer::Create() { 12 scoped_refptr<PictureImageLayer> PictureImageLayer::Create() {
13 return make_scoped_refptr(new PictureImageLayer()); 13 return make_scoped_refptr(new PictureImageLayer());
14 } 14 }
15 15
16 PictureImageLayer::PictureImageLayer() : PictureLayer(this) {} 16 PictureImageLayer::PictureImageLayer() : PictureLayer(this) {}
17 17
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 SkScalar content_to_layer_scale_x = 49 SkScalar content_to_layer_scale_x =
50 SkFloatToScalar(static_cast<float>(bounds().width()) / bitmap_.width()); 50 SkFloatToScalar(static_cast<float>(bounds().width()) / bitmap_.width());
51 SkScalar content_to_layer_scale_y = 51 SkScalar content_to_layer_scale_y =
52 SkFloatToScalar(static_cast<float>(bounds().height()) / bitmap_.height()); 52 SkFloatToScalar(static_cast<float>(bounds().height()) / bitmap_.height());
53 canvas->scale(content_to_layer_scale_x, content_to_layer_scale_y); 53 canvas->scale(content_to_layer_scale_x, content_to_layer_scale_y);
54 54
55 canvas->drawBitmap(bitmap_, 0, 0); 55 canvas->drawBitmap(bitmap_, 0, 0);
56 } 56 }
57 57
58 } // namespace cc 58 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_image_layer.h ('k') | cc/layers/picture_image_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698