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

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

Issue 1195513002: Use SkImage snapshots for ImageBufferSurface texture access (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 5 years, 6 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual void flushedDrawCommands() override; 65 virtual void flushedDrawCommands() override;
66 virtual void skippedPendingDrawCommands() override; 66 virtual void skippedPendingDrawCommands() override;
67 67
68 // ImageBufferSurface implementation 68 // ImageBufferSurface implementation
69 void finalizeFrame(const FloatRect &dirtyRect); 69 void finalizeFrame(const FloatRect &dirtyRect);
70 void willAccessPixels(); 70 void willAccessPixels();
71 SkCanvas* canvas() const { return m_canvas.get(); } 71 SkCanvas* canvas() const { return m_canvas.get(); }
72 bool checkSurfaceValid(); 72 bool checkSurfaceValid();
73 bool restoreSurface(); 73 bool restoreSurface();
74 WebLayer* layer() const; 74 WebLayer* layer() const;
75 Platform3DObject getBackingTexture(); 75 PassRefPtr<SkImage> getBackingTextureImage();
76 bool isAccelerated() const { return true; } 76 bool isAccelerated() const { return true; }
77 void setFilterQuality(SkFilterQuality); 77 void setFilterQuality(SkFilterQuality);
78 void setIsHidden(bool); 78 void setIsHidden(bool);
79 void setImageBuffer(ImageBuffer* imageBuffer) { m_imageBuffer = imageBuffer; } 79 void setImageBuffer(ImageBuffer* imageBuffer) { m_imageBuffer = imageBuffer; }
80 void didDraw(); 80 void didDraw();
81 81
82 // Methods used by Canvas2DLayerManager 82 // Methods used by Canvas2DLayerManager
83 virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking 83 virtual size_t freeMemoryIfPossible(size_t); // virtual for mocking
84 virtual void flush(); // virtual for mocking 84 virtual void flush(); // virtual for mocking
85 virtual size_t storageAllocatedForRecording(); // virtual for faking 85 virtual size_t storageAllocatedForRecording(); // virtual for faking
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 }; 137 };
138 138
139 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes; 139 Deque<MailboxInfo, MaxActiveMailboxes> m_mailboxes;
140 GLenum m_lastFilter; 140 GLenum m_lastFilter;
141 OpacityMode m_opacityMode; 141 OpacityMode m_opacityMode;
142 }; 142 };
143 143
144 } // namespace blink 144 } // namespace blink
145 145
146 #endif 146 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698