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

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

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: rebase Created 4 years 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 "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/CrossThreadFunctional.h" 10 #include "platform/CrossThreadFunctional.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // TODO(crbug.com/652931): update the device_scale_factor 187 // TODO(crbug.com/652931): update the device_scale_factor
188 frame.metadata.device_scale_factor = 1.0f; 188 frame.metadata.device_scale_factor = 1.0f;
189 189
190 const gfx::Rect bounds(m_width, m_height); 190 const gfx::Rect bounds(m_width, m_height);
191 const cc::RenderPassId renderPassId(1, 1); 191 const cc::RenderPassId renderPassId(1, 1);
192 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 192 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
193 pass->SetAll(renderPassId, bounds, bounds, gfx::Transform(), false); 193 pass->SetAll(renderPassId, bounds, bounds, gfx::Transform(), false);
194 194
195 cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState(); 195 cc::SharedQuadState* sqs = pass->CreateAndAppendSharedQuadState();
196 sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds, false, 1.f, 196 sqs->SetAll(gfx::Transform(), bounds.size(), bounds, bounds, false, 1.f,
197 SkXfermode::kSrcOver_Mode, 0); 197 SkBlendMode::kSrcOver, 0);
198 198
199 cc::TransferableResource resource; 199 cc::TransferableResource resource;
200 resource.id = m_nextResourceId; 200 resource.id = m_nextResourceId;
201 resource.format = cc::ResourceFormat::RGBA_8888; 201 resource.format = cc::ResourceFormat::RGBA_8888;
202 // TODO(crbug.com/645590): filter should respect the image-rendering CSS 202 // TODO(crbug.com/645590): filter should respect the image-rendering CSS
203 // property of associated canvas element. 203 // property of associated canvas element.
204 resource.filter = GL_LINEAR; 204 resource.filter = GL_LINEAR;
205 resource.size = gfx::Size(m_width, m_height); 205 resource.size = gfx::Size(m_width, m_height);
206 // TODO(crbug.com/646022): making this overlay-able. 206 // TODO(crbug.com/646022): making this overlay-able.
207 resource.is_overlay_candidate = false; 207 resource.is_overlay_candidate = false;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 397 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
398 const IntSize imageSize) { 398 const IntSize imageSize) {
399 if (imageSize.width() == m_width && imageSize.height() == m_height) 399 if (imageSize.width() == m_width && imageSize.height() == m_height)
400 return true; 400 return true;
401 return false; 401 return false;
402 } 402 }
403 403
404 } // namespace blink 404 } // namespace blink
OLDNEW
« no previous file with comments | « skia/ext/benchmarking_canvas.cc ('k') | third_party/WebKit/Source/platform/graphics/paint/CompositingDisplayItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698