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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp

Issue 2712083002: color: Remove blink pre-conversion code (Closed)
Patch Set: Rebase Created 3 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
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/svg/graphics/SVGImage.h" 5 #include "core/svg/graphics/SVGImage.h"
6 6
7 #include "core/svg/graphics/SVGImageChromeClient.h" 7 #include "core/svg/graphics/SVGImageChromeClient.h"
8 #include "platform/SharedBuffer.h" 8 #include "platform/SharedBuffer.h"
9 #include "platform/Timer.h" 9 #include "platform/Timer.h"
10 #include "platform/geometry/FloatRect.h" 10 #include "platform/geometry/FloatRect.h"
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 void pumpFrame() { 30 void pumpFrame() {
31 Image* image = m_image.get(); 31 Image* image = m_image.get();
32 std::unique_ptr<SkCanvas> nullCanvas = SkMakeNullCanvas(); 32 std::unique_ptr<SkCanvas> nullCanvas = SkMakeNullCanvas();
33 PaintCanvasPassThrough canvas(nullCanvas.get()); 33 PaintCanvasPassThrough canvas(nullCanvas.get());
34 PaintFlags flags; 34 PaintFlags flags;
35 FloatRect dummyRect(0, 0, 100, 100); 35 FloatRect dummyRect(0, 0, 100, 100);
36 image->draw(&canvas, flags, dummyRect, dummyRect, 36 image->draw(&canvas, flags, dummyRect, dummyRect,
37 DoNotRespectImageOrientation, 37 DoNotRespectImageOrientation,
38 Image::DoNotClampImageToSourceRect, 38 Image::DoNotClampImageToSourceRect);
39 ColorBehavior::transformToGlobalTarget());
40 } 39 }
41 40
42 private: 41 private:
43 class PauseControlImageObserver 42 class PauseControlImageObserver
44 : public GarbageCollectedFinalized<PauseControlImageObserver>, 43 : public GarbageCollectedFinalized<PauseControlImageObserver>,
45 public ImageObserver { 44 public ImageObserver {
46 USING_GARBAGE_COLLECTED_MIXIN(PauseControlImageObserver); 45 USING_GARBAGE_COLLECTED_MIXIN(PauseControlImageObserver);
47 46
48 public: 47 public:
49 PauseControlImageObserver(bool shouldPause) : m_shouldPause(shouldPause) {} 48 PauseControlImageObserver(bool shouldPause) : m_shouldPause(shouldPause) {}
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 EXPECT_TRUE(chromeClient.isSuspended()); 136 EXPECT_TRUE(chromeClient.isSuspended());
138 EXPECT_FALSE(timer->isActive()); 137 EXPECT_FALSE(timer->isActive());
139 138
140 // Simulate a draw. This should resume the animation again. 139 // Simulate a draw. This should resume the animation again.
141 pumpFrame(); 140 pumpFrame();
142 EXPECT_FALSE(chromeClient.isSuspended()); 141 EXPECT_FALSE(chromeClient.isSuspended());
143 EXPECT_TRUE(timer->isActive()); 142 EXPECT_TRUE(timer->isActive());
144 } 143 }
145 144
146 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698