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

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

Issue 2391753003: Stop exposing --disable-gpu-compositing as a Blink RuntimeEnabledFeature (Closed)
Patch Set: simplify changes 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 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/output/delegated_frame_data.h" 8 #include "cc/output/delegated_frame_data.h"
9 #include "cc/quads/render_pass.h" 9 #include "cc/quads/render_pass.h"
10 #include "cc/quads/shared_quad_state.h" 10 #include "cc/quads/shared_quad_state.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 resource.id = m_nextResourceId; 171 resource.id = m_nextResourceId;
172 resource.format = cc::ResourceFormat::RGBA_8888; 172 resource.format = cc::ResourceFormat::RGBA_8888;
173 // TODO(crbug.com/645590): filter should respect the image-rendering CSS 173 // TODO(crbug.com/645590): filter should respect the image-rendering CSS
174 // property of associated canvas element. 174 // property of associated canvas element.
175 resource.filter = GL_LINEAR; 175 resource.filter = GL_LINEAR;
176 resource.size = gfx::Size(m_width, m_height); 176 resource.size = gfx::Size(m_width, m_height);
177 // TODO(crbug.com/646022): making this overlay-able. 177 // TODO(crbug.com/646022): making this overlay-able.
178 resource.is_overlay_candidate = false; 178 resource.is_overlay_candidate = false;
179 179
180 if (!image->isTextureBacked() && 180 if (!image->isTextureBacked() &&
181 !RuntimeEnabledFeatures::gpuCompositingEnabled()) 181 !Platform::current()->isGPUCompositingEnabled())
182 setTransferableResourceInMemory(resource, image); 182 setTransferableResourceInMemory(resource, image);
183 else if (!image->isTextureBacked() && 183 else if (!image->isTextureBacked() &&
184 RuntimeEnabledFeatures::gpuCompositingEnabled()) 184 Platform::current()->isGPUCompositingEnabled())
185 setTransferableResourceMemoryToTexture(resource, image); 185 setTransferableResourceMemoryToTexture(resource, image);
186 else 186 else
187 setTransferableResourceInTexture(resource, image); 187 setTransferableResourceInTexture(resource, image);
188 188
189 m_nextResourceId++; 189 m_nextResourceId++;
190 frame.delegated_frame_data->resource_list.push_back(std::move(resource)); 190 frame.delegated_frame_data->resource_list.push_back(std::move(resource));
191 191
192 cc::TextureDrawQuad* quad = 192 cc::TextureDrawQuad* quad =
193 pass->CreateAndAppendDrawQuad<cc::TextureDrawQuad>(); 193 pass->CreateAndAppendDrawQuad<cc::TextureDrawQuad>();
194 gfx::Size rectSize(m_width, m_height); 194 gfx::Size rectSize(m_width, m_height);
(...skipping 29 matching lines...) Expand all
224 } 224 }
225 225
226 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize( 226 bool OffscreenCanvasFrameDispatcherImpl::verifyImageSize(
227 const sk_sp<SkImage>& image) { 227 const sk_sp<SkImage>& image) {
228 if (image && image->width() == m_width && image->height() == m_height) 228 if (image && image->width() == m_width && image->height() == m_height)
229 return true; 229 return true;
230 return false; 230 return false;
231 } 231 }
232 232
233 } // namespace blink 233 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in ('k') | third_party/WebKit/Source/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698