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

Side by Side Diff: Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h

Issue 16032003: Fixing Canvas2DLayerBridge to handle lost graphics contexts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 virtual void flush(); // virtual for mocking 80 virtual void flush(); // virtual for mocking
81 virtual size_t storageAllocatedForRecording(); // virtual for faking 81 virtual size_t storageAllocatedForRecording(); // virtual for faking
82 size_t bytesAllocated() const {return m_bytesAllocated;} 82 size_t bytesAllocated() const {return m_bytesAllocated;}
83 void limitPendingFrames(); 83 void limitPendingFrames();
84 84
85 WebKit::WebLayer* layer(); 85 WebKit::WebLayer* layer();
86 void contextAcquired(); 86 void contextAcquired();
87 87
88 unsigned backBufferTexture(); 88 unsigned backBufferTexture();
89 89
90 bool contextIsValid();
91
90 protected: 92 protected:
91 Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, SkDeferredCanvas*, Opacit yMode, ThreadMode); 93 Canvas2DLayerBridge(PassRefPtr<GraphicsContext3D>, SkDeferredCanvas*, Opacit yMode, ThreadMode);
92 94
93 SkDeferredCanvas* m_canvas; 95 SkDeferredCanvas* m_canvas;
94 OwnPtr<WebKit::WebExternalTextureLayer> m_layer; 96 OwnPtr<WebKit::WebExternalTextureLayer> m_layer;
95 RefPtr<GraphicsContext3D> m_context; 97 RefPtr<GraphicsContext3D> m_context;
96 size_t m_bytesAllocated; 98 size_t m_bytesAllocated;
97 bool m_didRecordDrawCommand; 99 bool m_didRecordDrawCommand;
98 int m_framesPending; 100 int m_framesPending;
99 101
(...skipping 19 matching lines...) Expand all
119 MailboxInfo* createMailboxInfo(); 121 MailboxInfo* createMailboxInfo();
120 122
121 uint32_t m_lastImageId; 123 uint32_t m_lastImageId;
122 Vector<MailboxInfo> m_mailboxes; 124 Vector<MailboxInfo> m_mailboxes;
123 #endif 125 #endif
124 }; 126 };
125 127
126 } 128 }
127 129
128 #endif 130 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698