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

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

Issue 2007553002: Retire setGradientSpaceTransform, setPatternSpaceTransform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fmalita discovers SkMatrix::I() Created 4 years, 6 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 | « third_party/WebKit/Source/platform/graphics/PicturePattern.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "platform/graphics/PicturePattern.h" 5 #include "platform/graphics/PicturePattern.h"
6 6
7 #include "platform/graphics/skia/SkiaUtils.h" 7 #include "platform/graphics/skia/SkiaUtils.h"
8 #include "third_party/skia/include/core/SkPicture.h" 8 #include "third_party/skia/include/core/SkPicture.h"
9 #include "third_party/skia/include/core/SkShader.h" 9 #include "third_party/skia/include/core/SkShader.h"
10 10
(...skipping 12 matching lines...) Expand all
23 // All current clients use RepeatModeXY, so we only support this mode for no w. 23 // All current clients use RepeatModeXY, so we only support this mode for no w.
24 ASSERT(isRepeatXY()); 24 ASSERT(isRepeatXY());
25 25
26 // FIXME: we don't have a good way to account for DL memory utilization. 26 // FIXME: we don't have a good way to account for DL memory utilization.
27 } 27 }
28 28
29 PicturePattern::~PicturePattern() 29 PicturePattern::~PicturePattern()
30 { 30 {
31 } 31 }
32 32
33 sk_sp<SkShader> PicturePattern::createShader() const 33 sk_sp<SkShader> PicturePattern::createShader(const SkMatrix& localMatrix) const
34 { 34 {
35 SkMatrix localMatrix = affineTransformToSkMatrix(m_patternSpaceTransformatio n);
36 SkRect tileBounds = m_tilePicture->cullRect(); 35 SkRect tileBounds = m_tilePicture->cullRect();
37 36
38 return SkShader::MakePictureShader(m_tilePicture, 37 return SkShader::MakePictureShader(m_tilePicture,
39 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix, &t ileBounds); 38 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode, &localMatrix, &t ileBounds);
40 } 39 }
41 40
42 } // namespace blink 41 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/PicturePattern.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698