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

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

Issue 2425113002: Fix the linear-rgb canvas color space so that it renders (Closed)
Patch Set: Created 4 years, 2 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 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/RecordingImageBufferSurface.h" 5 #include "platform/graphics/RecordingImageBufferSurface.h"
6 6
7 #include "platform/graphics/GraphicsContext.h" 7 #include "platform/graphics/GraphicsContext.h"
8 #include "platform/graphics/ImageBuffer.h" 8 #include "platform/graphics/ImageBuffer.h"
9 #include "platform/graphics/ImageBufferClient.h" 9 #include "platform/graphics/ImageBufferClient.h"
10 #include "platform/graphics/UnacceleratedImageBufferSurface.h" 10 #include "platform/graphics/UnacceleratedImageBufferSurface.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 int m_frameCount; 70 int m_frameCount;
71 }; 71 };
72 72
73 class MockSurfaceFactory : public RecordingImageBufferFallbackSurfaceFactory { 73 class MockSurfaceFactory : public RecordingImageBufferFallbackSurfaceFactory {
74 public: 74 public:
75 MockSurfaceFactory() : m_createSurfaceCount(0) {} 75 MockSurfaceFactory() : m_createSurfaceCount(0) {}
76 76
77 virtual std::unique_ptr<ImageBufferSurface> createSurface( 77 virtual std::unique_ptr<ImageBufferSurface> createSurface(
78 const IntSize& size, 78 const IntSize& size,
79 OpacityMode opacityMode, 79 OpacityMode opacityMode,
80 sk_sp<SkColorSpace> colorSpace) { 80 sk_sp<SkColorSpace> colorSpace,
81 SkColorType colorType) {
81 m_createSurfaceCount++; 82 m_createSurfaceCount++;
82 return wrapUnique(new UnacceleratedImageBufferSurface( 83 return wrapUnique(new UnacceleratedImageBufferSurface(
83 size, opacityMode, InitializeImagePixels, std::move(colorSpace))); 84 size, opacityMode, InitializeImagePixels, std::move(colorSpace),
85 colorType));
84 } 86 }
85 87
86 virtual ~MockSurfaceFactory() {} 88 virtual ~MockSurfaceFactory() {}
87 89
88 int createSurfaceCount() { return m_createSurfaceCount; } 90 int createSurfaceCount() { return m_createSurfaceCount; }
89 91
90 private: 92 private:
91 int m_createSurfaceCount; 93 int m_createSurfaceCount;
92 }; 94 };
93 95
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 CALL_TEST_TASK_WRAPPER(testAnimatedWithClear) 270 CALL_TEST_TASK_WRAPPER(testAnimatedWithClear)
269 expectDisplayListEnabled(true); 271 expectDisplayListEnabled(true);
270 } 272 }
271 273
272 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) { 274 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) {
273 CALL_TEST_TASK_WRAPPER(testClearRect); 275 CALL_TEST_TASK_WRAPPER(testClearRect);
274 expectDisplayListEnabled(true); 276 expectDisplayListEnabled(true);
275 } 277 }
276 278
277 } // namespace blink 279 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698