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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.h

Issue 2285153004: Clean up and fix logic around creating ImageBufferSurface and fallbacks (Closed)
Patch Set: surfacefallbacks Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 static CanvasRenderingContextFactory* getRenderingContextFactory(int); 223 static CanvasRenderingContextFactory* getRenderingContextFactory(int);
224 224
225 bool shouldAccelerate(const IntSize&) const; 225 bool shouldAccelerate(const IntSize&) const;
226 226
227 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; 227 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override;
228 LayoutObject* createLayoutObject(const ComputedStyle&) override; 228 LayoutObject* createLayoutObject(const ComputedStyle&) override;
229 bool areAuthorShadowsAllowed() const override { return false; } 229 bool areAuthorShadowsAllowed() const override { return false; }
230 230
231 void reset(); 231 void reset();
232 232
233 std::unique_ptr<ImageBufferSurface> createWebGLImageBufferSurface(const IntS ize& deviceSize, OpacityMode, sk_sp<SkColorSpace>);
233 std::unique_ptr<ImageBufferSurface> createAcceleratedImageBufferSurface(cons t IntSize& deviceSize, OpacityMode, sk_sp<SkColorSpace>, int* msaaSampleCount); 234 std::unique_ptr<ImageBufferSurface> createAcceleratedImageBufferSurface(cons t IntSize& deviceSize, OpacityMode, sk_sp<SkColorSpace>, int* msaaSampleCount);
234 std::unique_ptr<ImageBufferSurface> createUnacceleratedImageBufferSurface(co nst IntSize& deviceSize, OpacityMode, sk_sp<SkColorSpace>); 235 std::unique_ptr<ImageBufferSurface> createUnacceleratedImageBufferSurface(co nst IntSize& deviceSize, OpacityMode, sk_sp<SkColorSpace>);
235 void createImageBuffer(); 236 void createImageBuffer();
236 void createImageBufferInternal(std::unique_ptr<ImageBufferSurface> externalS urface); 237 void createImageBufferInternal(std::unique_ptr<ImageBufferSurface> externalS urface);
237 bool shouldUseDisplayList(const IntSize& deviceSize); 238 bool shouldUseDisplayList(const IntSize& deviceSize);
238 239
239 void setSurfaceSize(const IntSize&); 240 void setSurfaceSize(const IntSize&);
240 241
241 bool paintsIntoCanvasBuffer() const; 242 bool paintsIntoCanvasBuffer() const;
242 243
(...skipping 25 matching lines...) Expand all
268 // Used for OffscreenCanvas that controls this HTML canvas element 269 // Used for OffscreenCanvas that controls this HTML canvas element
269 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; 270 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge;
270 271
271 int m_numFramesSinceLastRenderingModeSwitch; 272 int m_numFramesSinceLastRenderingModeSwitch;
272 bool m_pendingRenderingModeSwitch; 273 bool m_pendingRenderingModeSwitch;
273 }; 274 };
274 275
275 } // namespace blink 276 } // namespace blink
276 277
277 #endif // HTMLCanvasElement_h 278 #endif // HTMLCanvasElement_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698