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

Side by Side Diff: ppapi/proxy/compositor_layer_resource.h

Issue 1097393007: Update {virtual,override} to follow C++11 style in ppapi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split off one file into separate review. Created 5 years, 8 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 | « ppapi/proxy/browser_font_singleton_resource.h ('k') | ppapi/proxy/compositor_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_
6 #define PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_ 6 #define PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_
7 7
8 #include "ppapi/c/ppb_compositor_layer.h" 8 #include "ppapi/c/ppb_compositor_layer.h"
9 #include "ppapi/proxy/plugin_resource.h" 9 #include "ppapi/proxy/plugin_resource.h"
10 #include "ppapi/proxy/ppapi_proxy_export.h" 10 #include "ppapi/proxy/ppapi_proxy_export.h"
(...skipping 24 matching lines...) Expand all
35 void ResetReleaseCallback() { release_callback_.Reset(); } 35 void ResetReleaseCallback() { release_callback_.Reset(); }
36 void Invalidate() { compositor_ = NULL; } 36 void Invalidate() { compositor_ = NULL; }
37 37
38 private: 38 private:
39 enum LayerType { 39 enum LayerType {
40 TYPE_COLOR, 40 TYPE_COLOR,
41 TYPE_TEXTURE, 41 TYPE_TEXTURE,
42 TYPE_IMAGE, 42 TYPE_IMAGE,
43 }; 43 };
44 44
45 virtual ~CompositorLayerResource(); 45 ~CompositorLayerResource() override;
46 46
47 // Resource overrides: 47 // Resource overrides:
48 virtual thunk::PPB_CompositorLayer_API* AsPPB_CompositorLayer_API() override; 48 thunk::PPB_CompositorLayer_API* AsPPB_CompositorLayer_API() override;
49 49
50 // thunk::PPB_Compositor_API overrides: 50 // thunk::PPB_Compositor_API overrides:
51 virtual int32_t SetColor(float red, 51 int32_t SetColor(float red,
52 float green, 52 float green,
53 float blue, 53 float blue,
54 float alpha, 54 float alpha,
55 const PP_Size* size) override; 55 const PP_Size* size) override;
56 virtual int32_t SetTexture0_1( 56 int32_t SetTexture0_1(
57 PP_Resource context, 57 PP_Resource context,
58 uint32_t texture, 58 uint32_t texture,
59 const PP_Size* size, 59 const PP_Size* size,
60 const scoped_refptr<ppapi::TrackedCallback>& callback) override; 60 const scoped_refptr<ppapi::TrackedCallback>& callback) override;
61 virtual int32_t SetTexture( 61 int32_t SetTexture(
62 PP_Resource context, 62 PP_Resource context,
63 uint32_t target, 63 uint32_t target,
64 uint32_t texture, 64 uint32_t texture,
65 const PP_Size* size, 65 const PP_Size* size,
66 const scoped_refptr<TrackedCallback>& callback) override; 66 const scoped_refptr<TrackedCallback>& callback) override;
67 virtual int32_t SetImage( 67 int32_t SetImage(
68 PP_Resource image_data, 68 PP_Resource image_data,
69 const PP_Size* size, 69 const PP_Size* size,
70 const scoped_refptr<TrackedCallback>& callback) override; 70 const scoped_refptr<TrackedCallback>& callback) override;
71 virtual int32_t SetClipRect(const PP_Rect* rect) override; 71 int32_t SetClipRect(const PP_Rect* rect) override;
72 virtual int32_t SetTransform(const float matrix[16]) override; 72 int32_t SetTransform(const float matrix[16]) override;
73 virtual int32_t SetOpacity(float opacity) override; 73 int32_t SetOpacity(float opacity) override;
74 virtual int32_t SetBlendMode(PP_BlendMode mode) override; 74 int32_t SetBlendMode(PP_BlendMode mode) override;
75 virtual int32_t SetSourceRect(const PP_FloatRect* rect) override; 75 int32_t SetSourceRect(const PP_FloatRect* rect) override;
76 virtual int32_t SetPremultipliedAlpha(PP_Bool premult) override; 76 int32_t SetPremultipliedAlpha(PP_Bool premult) override;
77 77
78 bool SetType(LayerType type); 78 bool SetType(LayerType type);
79 int32_t CheckForSetTextureAndImage( 79 int32_t CheckForSetTextureAndImage(
80 LayerType type, 80 LayerType type,
81 const scoped_refptr<TrackedCallback>& release_callback); 81 const scoped_refptr<TrackedCallback>& release_callback);
82 82
83 // The CompositorResource which own the layer. The layer is invalidated if 83 // The CompositorResource which own the layer. The layer is invalidated if
84 // compositor_ is NULL. 84 // compositor_ is NULL.
85 const CompositorResource* compositor_; 85 const CompositorResource* compositor_;
86 86
87 // Release callback for uncommitted texture or image. When CommitLayers() on 87 // Release callback for uncommitted texture or image. When CommitLayers() on
88 // the compositor_ is called, the callback will be copied into a map in the 88 // the compositor_ is called, the callback will be copied into a map in the
89 // compositor_, and it will be reset to NULL. 89 // compositor_, and it will be reset to NULL.
90 ReleaseCallback release_callback_; 90 ReleaseCallback release_callback_;
91 91
92 // Size of texture or image. It is used to verify the rect arg of 92 // Size of texture or image. It is used to verify the rect arg of
93 // SetSourceRect(). 93 // SetSourceRect().
94 PP_FloatSize source_size_; 94 PP_FloatSize source_size_;
95 95
96 // Layer data. 96 // Layer data.
97 CompositorLayerData data_; 97 CompositorLayerData data_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(CompositorLayerResource); 99 DISALLOW_COPY_AND_ASSIGN(CompositorLayerResource);
100 }; 100 };
101 101
102 } // namespace proxy 102 } // namespace proxy
103 } // namespace ppapi 103 } // namespace ppapi
104 104
105 #endif // PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_ 105 #endif // PPAPI_PROXY_COMPOSITOR_LAYER_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/browser_font_singleton_resource.h ('k') | ppapi/proxy/compositor_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698