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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GeneratedImage.cpp

Issue 1685353004: Clean up Image::computeIntrinsicDimensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #include "platform/graphics/GeneratedImage.h" 31 #include "platform/graphics/GeneratedImage.h"
32 32
33 #include "platform/geometry/FloatRect.h" 33 #include "platform/geometry/FloatRect.h"
34 #include "platform/graphics/paint/SkPictureBuilder.h" 34 #include "platform/graphics/paint/SkPictureBuilder.h"
35 #include "third_party/skia/include/core/SkImage.h" 35 #include "third_party/skia/include/core/SkImage.h"
36 #include "third_party/skia/include/core/SkPicture.h" 36 #include "third_party/skia/include/core/SkPicture.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 void GeneratedImage::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio) 40 void GeneratedImage::computeIntrinsicDimensions(FloatSize& intrinsicSize, FloatS ize& intrinsicRatio)
41 { 41 {
42 Image::computeIntrinsicDimensions(intrinsicWidth, intrinsicHeight, intrinsic Ratio); 42 Image::computeIntrinsicDimensions(intrinsicSize, intrinsicRatio);
43 intrinsicRatio = FloatSize(); 43 intrinsicRatio = FloatSize();
44 } 44 }
45 45
46 void GeneratedImage::drawPattern(GraphicsContext& destContext, const FloatRect& srcRect, const FloatSize& scale, 46 void GeneratedImage::drawPattern(GraphicsContext& destContext, const FloatRect& srcRect, const FloatSize& scale,
47 const FloatPoint& phase, SkXfermode::Mode compositeOp, const FloatRect& dest Rect, 47 const FloatPoint& phase, SkXfermode::Mode compositeOp, const FloatRect& dest Rect,
48 const FloatSize& repeatSpacing) 48 const FloatSize& repeatSpacing)
49 { 49 {
50 FloatRect tileRect = srcRect; 50 FloatRect tileRect = srcRect;
51 tileRect.expand(FloatSize(repeatSpacing)); 51 tileRect.expand(FloatSize(repeatSpacing));
52 52
(...skipping 17 matching lines...) Expand all
70 70
71 destContext.drawRect(destRect, fillPaint); 71 destContext.drawRect(destRect, fillPaint);
72 } 72 }
73 73
74 PassRefPtr<SkImage> GeneratedImage::imageForCurrentFrame() 74 PassRefPtr<SkImage> GeneratedImage::imageForCurrentFrame()
75 { 75 {
76 return nullptr; 76 return nullptr;
77 } 77 }
78 78
79 } // namespace blink 79 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GeneratedImage.h ('k') | third_party/WebKit/Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698