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

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

Issue 2426573004: Fix Unaccelerated2DGpuCompositing gpu test cases (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
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_test_pages.py ('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 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 "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h" 5 #include "platform/graphics/OffscreenCanvasFrameDispatcherImpl.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "gpu/command_buffer/client/gles2_interface.h" 9 #include "gpu/command_buffer/client/gles2_interface.h"
10 #include "platform/Histogram.h" 10 #include "platform/Histogram.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // WebGraphicsContext3DProvider::isSoftwareRendering. 198 // WebGraphicsContext3DProvider::isSoftwareRendering.
199 commitType = CommitGPUCanvasSoftwareCompositing; 199 commitType = CommitGPUCanvasSoftwareCompositing;
200 setTransferableResourceToSharedBitmap(resource, image); 200 setTransferableResourceToSharedBitmap(resource, image);
201 } 201 }
202 } else { 202 } else {
203 if (Platform::current()->isGPUCompositingEnabled() && 203 if (Platform::current()->isGPUCompositingEnabled() &&
204 !isWebGLSoftwareRendering) { 204 !isWebGLSoftwareRendering) {
205 // Case 3: canvas is not gpu-accelerated, but compositor is 205 // Case 3: canvas is not gpu-accelerated, but compositor is
206 commitType = CommitSoftwareCanvasGPUCompositing; 206 commitType = CommitSoftwareCanvasGPUCompositing;
207 setTransferableResourceToSharedGPUContext(resource, image); 207 setTransferableResourceToSharedGPUContext(resource, image);
208 yflipped = true;
209 } else { 208 } else {
210 // Case 4: both canvas and compositor are not gpu accelerated. 209 // Case 4: both canvas and compositor are not gpu accelerated.
211 commitType = CommitSoftwareCanvasSoftwareCompositing; 210 commitType = CommitSoftwareCanvasSoftwareCompositing;
212 setTransferableResourceToSharedBitmap(resource, image); 211 setTransferableResourceToSharedBitmap(resource, image);
213 } 212 }
214 } 213 }
215 commitTypeHistogram.count(commitType); 214 commitTypeHistogram.count(commitType);
216 215
217 m_nextResourceId++; 216 m_nextResourceId++;
218 frame.delegated_frame_data->resource_list.push_back(std::move(resource)); 217 frame.delegated_frame_data->resource_list.push_back(std::move(resource));
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 324 }
326 325
327 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 326 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
328 const sk_sp<SkImage>& image) { 327 const sk_sp<SkImage>& image) {
329 if (image && image->width() == m_width && image->height() == m_height) 328 if (image && image->width() == m_width && image->height() == m_height)
330 return true; 329 return true;
331 return false; 330 return false;
332 } 331 }
333 332
334 } // namespace blink 333 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_test_pages.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698