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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h

Issue 1497683002: Make platform/graphics to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 class WebExternalTextureLayer; 60 class WebExternalTextureLayer;
61 class WebGraphicsContext3D; 61 class WebGraphicsContext3D;
62 class WebLayer; 62 class WebLayer;
63 63
64 // Manages a rendering target (framebuffer + attachment) for a canvas. Can publ ish its rendering 64 // Manages a rendering target (framebuffer + attachment) for a canvas. Can publ ish its rendering
65 // results to a WebLayer for compositing. 65 // results to a WebLayer for compositing.
66 class PLATFORM_EXPORT DrawingBuffer : public RefCounted<DrawingBuffer>, public W ebExternalTextureLayerClient { 66 class PLATFORM_EXPORT DrawingBuffer : public RefCounted<DrawingBuffer>, public W ebExternalTextureLayerClient {
67 // If we used CHROMIUM_image as the backing storage for our buffers, 67 // If we used CHROMIUM_image as the backing storage for our buffers,
68 // we need to know the mapping from texture id to image. 68 // we need to know the mapping from texture id to image.
69 struct TextureInfo { 69 struct TextureInfo {
70 DISALLOW_NEW();
70 Platform3DObject textureId; 71 Platform3DObject textureId;
71 WGC3Duint imageId; 72 WGC3Duint imageId;
72 73
73 TextureInfo() 74 TextureInfo()
74 : textureId(0) 75 : textureId(0)
75 , imageId(0) 76 , imageId(0)
76 { 77 {
77 } 78 }
78 }; 79 };
79 80
80 struct MailboxInfo : public RefCounted<MailboxInfo> { 81 struct MailboxInfo : public RefCounted<MailboxInfo> {
82 WTF_MAKE_NONCOPYABLE(MailboxInfo);
83 public:
84 MailboxInfo() { }
85
81 WebExternalTextureMailbox mailbox; 86 WebExternalTextureMailbox mailbox;
82 TextureInfo textureInfo; 87 TextureInfo textureInfo;
83 IntSize size; 88 IntSize size;
84 // This keeps the parent drawing buffer alive as long as the compositor is 89 // This keeps the parent drawing buffer alive as long as the compositor is
85 // referring to one of the mailboxes DrawingBuffer produced. The parent drawing buffer is 90 // referring to one of the mailboxes DrawingBuffer produced. The parent drawing buffer is
86 // cleared when the compositor returns the mailbox. See mailboxReleased( ). 91 // cleared when the compositor returns the mailbox. See mailboxReleased( ).
87 RefPtr<DrawingBuffer> m_parentDrawingBuffer; 92 RefPtr<DrawingBuffer> m_parentDrawingBuffer;
88 }; 93 };
94 WTF_MAKE_NONCOPYABLE(DrawingBuffer);
89 public: 95 public:
90 enum PreserveDrawingBuffer { 96 enum PreserveDrawingBuffer {
91 Preserve, 97 Preserve,
92 Discard 98 Discard
93 }; 99 };
94 100
95 static PassRefPtr<DrawingBuffer> create(PassOwnPtr<WebGraphicsContext3D>, co nst IntSize&, PreserveDrawingBuffer, WebGraphicsContext3D::Attributes requestedA ttributes); 101 static PassRefPtr<DrawingBuffer> create(PassOwnPtr<WebGraphicsContext3D>, co nst IntSize&, PreserveDrawingBuffer, WebGraphicsContext3D::Attributes requestedA ttributes);
96 static void forceNextDrawingBufferCreationToFail(); 102 static void forceNextDrawingBufferCreationToFail();
97 103
98 ~DrawingBuffer() override; 104 ~DrawingBuffer() override;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // used to resize the Canvas. 318 // used to resize the Canvas.
313 SkBitmap m_resizingBitmap; 319 SkBitmap m_resizingBitmap;
314 320
315 // Used to flip a bitmap vertically. 321 // Used to flip a bitmap vertically.
316 Vector<uint8_t> m_scanline; 322 Vector<uint8_t> m_scanline;
317 }; 323 };
318 324
319 } // namespace blink 325 } // namespace blink
320 326
321 #endif // DrawingBuffer_h 327 #endif // DrawingBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698