OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const FloatRect& srcRect, | 81 const FloatRect& srcRect, |
82 SkXfermode::Mode); | 82 SkXfermode::Mode); |
83 virtual void setHasExpensiveOp() {} | 83 virtual void setHasExpensiveOp() {} |
84 virtual GLuint getBackingTextureHandleForOverwrite() { return 0; } | 84 virtual GLuint getBackingTextureHandleForOverwrite() { return 0; } |
85 | 85 |
86 // Executes all deferred rendering immediately. | 86 // Executes all deferred rendering immediately. |
87 virtual void flush(FlushReason); | 87 virtual void flush(FlushReason); |
88 | 88 |
89 // Like flush, but flushes all the way down to the GPU context if the surface | 89 // Like flush, but flushes all the way down to the GPU context if the surface |
90 // uses the GPU. | 90 // uses the GPU. |
91 virtual void flushGpu(FlushReason reason) { | 91 virtual void flushGpu(FlushReason reason) { flush(reason); } |
92 flush(reason); | |
93 } | |
94 | 92 |
95 virtual void prepareSurfaceForPaintingIfNeeded() {} | 93 virtual void prepareSurfaceForPaintingIfNeeded() {} |
96 virtual bool writePixels(const SkImageInfo& origInfo, | 94 virtual bool writePixels(const SkImageInfo& origInfo, |
97 const void* pixels, | 95 const void* pixels, |
98 size_t rowBytes, | 96 size_t rowBytes, |
99 int x, | 97 int x, |
100 int y); | 98 int y); |
101 | 99 |
102 // May return nullptr if the surface is GPU-backed and the GPU context was | 100 // May return nullptr if the surface is GPU-backed and the GPU context was |
103 // lost. | 101 // lost. |
(...skipping 10 matching lines...) Expand all Loading... |
114 | 112 |
115 private: | 113 private: |
116 OpacityMode m_opacityMode; | 114 OpacityMode m_opacityMode; |
117 IntSize m_size; | 115 IntSize m_size; |
118 sk_sp<SkColorSpace> m_colorSpace; | 116 sk_sp<SkColorSpace> m_colorSpace; |
119 }; | 117 }; |
120 | 118 |
121 } // namespace blink | 119 } // namespace blink |
122 | 120 |
123 #endif | 121 #endif |
OLD | NEW |