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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPaintValue.cpp

Issue 2104103003: Fix zoom in CSS paint worklets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2nd rebase Created 4 years, 5 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "core/css/CSSPaintValue.h" 5 #include "core/css/CSSPaintValue.h"
6 6
7 #include "core/css/CSSCustomIdentValue.h" 7 #include "core/css/CSSCustomIdentValue.h"
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 #include "platform/graphics/Image.h" 9 #include "platform/graphics/Image.h"
10 #include "wtf/text/StringBuilder.h" 10 #include "wtf/text/StringBuilder.h"
(...skipping 18 matching lines...) Expand all
29 result.append(m_name->customCSSText()); 29 result.append(m_name->customCSSText());
30 result.append(')'); 30 result.append(')');
31 return result.toString(); 31 return result.toString();
32 } 32 }
33 33
34 String CSSPaintValue::name() const 34 String CSSPaintValue::name() const
35 { 35 {
36 return m_name->value(); 36 return m_name->value();
37 } 37 }
38 38
39 PassRefPtr<Image> CSSPaintValue::image(const LayoutObject& layoutObject, const I ntSize& size) 39 PassRefPtr<Image> CSSPaintValue::image(const LayoutObject& layoutObject, const I ntSize& size, float zoom)
40 { 40 {
41 if (!m_generator) 41 if (!m_generator)
42 m_generator = CSSPaintImageGenerator::create(name(), layoutObject.docume nt(), m_paintImageGeneratorObserver); 42 m_generator = CSSPaintImageGenerator::create(name(), layoutObject.docume nt(), m_paintImageGeneratorObserver);
43 43
44 return m_generator->paint(layoutObject, size); 44 return m_generator->paint(layoutObject, size, zoom);
45 } 45 }
46 46
47 void CSSPaintValue::Observer::paintImageGeneratorReady() 47 void CSSPaintValue::Observer::paintImageGeneratorReady()
48 { 48 {
49 m_ownerValue->paintImageGeneratorReady(); 49 m_ownerValue->paintImageGeneratorReady();
50 } 50 }
51 51
52 void CSSPaintValue::paintImageGeneratorReady() 52 void CSSPaintValue::paintImageGeneratorReady()
53 { 53 {
54 for (const LayoutObject* client : clients().keys()) { 54 for (const LayoutObject* client : clients().keys()) {
(...skipping 13 matching lines...) Expand all
68 68
69 DEFINE_TRACE_AFTER_DISPATCH(CSSPaintValue) 69 DEFINE_TRACE_AFTER_DISPATCH(CSSPaintValue)
70 { 70 {
71 visitor->trace(m_name); 71 visitor->trace(m_name);
72 visitor->trace(m_generator); 72 visitor->trace(m_generator);
73 visitor->trace(m_paintImageGeneratorObserver); 73 visitor->trace(m_paintImageGeneratorObserver);
74 CSSImageGeneratorValue::traceAfterDispatch(visitor); 74 CSSImageGeneratorValue::traceAfterDispatch(visitor);
75 } 75 }
76 76
77 } // namespace blink 77 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPaintValue.h ('k') | third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698