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

Side by Side Diff: content/common/gpu/image_transport_surface.h

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win bot happy Created 8 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
« no previous file with comments | « content/common/gpu/gpu_watchdog.h ('k') | content/public/browser/download_manager_delegate.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU) 9 #if defined(ENABLE_GPU)
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // should be responded to. The factory returns an offscreen surface that looks 52 // should be responded to. The factory returns an offscreen surface that looks
53 // a lot like an onscreen surface to the GPU process. 53 // a lot like an onscreen surface to the GPU process.
54 // 54 //
55 // The ImageTransportSurfaceHelper provides some glue to the outside world: 55 // The ImageTransportSurfaceHelper provides some glue to the outside world:
56 // making sure outside events reach the ImageTransportSurface and 56 // making sure outside events reach the ImageTransportSurface and
57 // allowing the ImageTransportSurface to send events to the outside world. 57 // allowing the ImageTransportSurface to send events to the outside world.
58 58
59 class ImageTransportSurface { 59 class ImageTransportSurface {
60 public: 60 public:
61 ImageTransportSurface(); 61 ImageTransportSurface();
62 virtual ~ImageTransportSurface();
63 62
64 virtual void OnNewSurfaceACK( 63 virtual void OnNewSurfaceACK(
65 uint64 surface_id, TransportDIB::Handle surface_handle) = 0; 64 uint64 surface_id, TransportDIB::Handle surface_handle) = 0;
66 virtual void OnBufferPresented() = 0; 65 virtual void OnBufferPresented() = 0;
67 virtual void OnResizeViewACK() = 0; 66 virtual void OnResizeViewACK() = 0;
68 virtual void OnResize(gfx::Size size) = 0; 67 virtual void OnResize(gfx::Size size) = 0;
69 68
70 // Creates the appropriate surface depending on the GL implementation. 69 // Creates the appropriate surface depending on the GL implementation.
71 static scoped_refptr<gfx::GLSurface> 70 static scoped_refptr<gfx::GLSurface>
72 CreateSurface(GpuChannelManager* manager, 71 CreateSurface(GpuChannelManager* manager,
73 GpuCommandBufferStub* stub, 72 GpuCommandBufferStub* stub,
74 const gfx::GLSurfaceHandle& handle); 73 const gfx::GLSurfaceHandle& handle);
75 protected: 74 protected:
76 // Used by certain implements of PostSubBuffer to determine 75 // Used by certain implements of PostSubBuffer to determine
77 // how much needs to be copied between frames. 76 // how much needs to be copied between frames.
78 void GetRegionsToCopy(const gfx::Rect& previous_damage_rect, 77 void GetRegionsToCopy(const gfx::Rect& previous_damage_rect,
79 const gfx::Rect& new_damage_rect, 78 const gfx::Rect& new_damage_rect,
80 std::vector<gfx::Rect>* regions); 79 std::vector<gfx::Rect>* regions);
81 80
81 protected:
82 virtual ~ImageTransportSurface();
83
82 private: 84 private:
83 DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface); 85 DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface);
84 }; 86 };
85 87
86 class ImageTransportHelper : public IPC::Listener { 88 class ImageTransportHelper : public IPC::Listener {
87 public: 89 public:
88 // Takes weak pointers to objects that outlive the helper. 90 // Takes weak pointers to objects that outlive the helper.
89 ImageTransportHelper(ImageTransportSurface* surface, 91 ImageTransportHelper(ImageTransportSurface* surface,
90 GpuChannelManager* manager, 92 GpuChannelManager* manager,
91 GpuCommandBufferStub* stub, 93 GpuCommandBufferStub* stub,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 gfx::Size new_size_; 186 gfx::Size new_size_;
185 bool transport_; 187 bool transport_;
186 bool did_set_swap_interval_; 188 bool did_set_swap_interval_;
187 189
188 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface); 190 DISALLOW_COPY_AND_ASSIGN(PassThroughImageTransportSurface);
189 }; 191 };
190 192
191 #endif // defined(ENABLE_GPU) 193 #endif // defined(ENABLE_GPU)
192 194
193 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ 195 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_watchdog.h ('k') | content/public/browser/download_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698