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

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

Issue 2101823002: Revert of Make 2D canvas disable gpu acceleration when getImageData is called (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 20 matching lines...) Expand all
31 : m_isDirty(false) 31 : m_isDirty(false)
32 , m_imageBuffer(imageBuffer) 32 , m_imageBuffer(imageBuffer)
33 , m_frameCount(0) 33 , m_frameCount(0)
34 { } 34 { }
35 35
36 ~FakeImageBufferClient() override { } 36 ~FakeImageBufferClient() override { }
37 37
38 // ImageBufferClient implementation 38 // ImageBufferClient implementation
39 void notifySurfaceInvalid() override { } 39 void notifySurfaceInvalid() override { }
40 bool isDirty() override { return m_isDirty; } 40 bool isDirty() override { return m_isDirty; }
41 void didDisableAcceleration() override { }
42 void didFinalizeFrame() override 41 void didFinalizeFrame() override
43 { 42 {
44 if (m_isDirty) { 43 if (m_isDirty) {
45 Platform::current()->currentThread()->removeTaskObserver(this); 44 Platform::current()->currentThread()->removeTaskObserver(this);
46 m_isDirty = false; 45 m_isDirty = false;
47 } 46 }
48 ++m_frameCount; 47 ++m_frameCount;
49 } 48 }
50 49
51 // TaskObserver implementation 50 // TaskObserver implementation
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 expectDisplayListEnabled(true); 384 expectDisplayListEnabled(true);
386 } 385 }
387 386
388 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) 387 TEST_F(RecordingImageBufferSurfaceTest, testClearRect)
389 { 388 {
390 CALL_TEST_TASK_WRAPPER(testClearRect); 389 CALL_TEST_TASK_WRAPPER(testClearRect);
391 expectDisplayListEnabled(true); 390 expectDisplayListEnabled(true);
392 } 391 }
393 392
394 } // namespace blink 393 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698