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

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

Issue 15685003: Part 2/3 (GL) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-resolve against head Created 7 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 // 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_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_
6 #define CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; 47 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
48 virtual void* GetShareHandle() OVERRIDE; 48 virtual void* GetShareHandle() OVERRIDE;
49 virtual void* GetDisplay() OVERRIDE; 49 virtual void* GetDisplay() OVERRIDE;
50 virtual void* GetConfig() OVERRIDE; 50 virtual void* GetConfig() OVERRIDE;
51 51
52 protected: 52 protected:
53 // ImageTransportSurface implementation. 53 // ImageTransportSurface implementation.
54 virtual void OnBufferPresented( 54 virtual void OnBufferPresented(
55 const AcceleratedSurfaceMsg_BufferPresented_Params& params) OVERRIDE; 55 const AcceleratedSurfaceMsg_BufferPresented_Params& params) OVERRIDE;
56 virtual void OnResizeViewACK() OVERRIDE; 56 virtual void OnResizeViewACK() OVERRIDE;
57 virtual void OnResize(gfx::Size size) OVERRIDE; 57 virtual void OnResize(gfx::Size size, float scale_factor) OVERRIDE;
58 virtual void SetLatencyInfo( 58 virtual void SetLatencyInfo(
59 const cc::LatencyInfo& latency_info) OVERRIDE; 59 const cc::LatencyInfo& latency_info) OVERRIDE;
60 60
61 // GpuCommandBufferStub::DestructionObserver implementation. 61 // GpuCommandBufferStub::DestructionObserver implementation.
62 virtual void OnWillDestroyStub() OVERRIDE; 62 virtual void OnWillDestroyStub() OVERRIDE;
63 63
64 private: 64 private:
65 65
66 gfx::Size backbuffer_size() const { 66 gfx::Size backbuffer_size() const {
67 return gfx::Size(backbuffer_->level_infos()[0][0].width, 67 return gfx::Size(backbuffer_->level_infos()[0][0].width,
(...skipping 18 matching lines...) Expand all
86 // The current backbuffer. 86 // The current backbuffer.
87 scoped_ptr<gpu::gles2::TextureDefinition> backbuffer_; 87 scoped_ptr<gpu::gles2::TextureDefinition> backbuffer_;
88 88
89 // The mailbox name for the current backbuffer texture. Needs to be unique per 89 // The mailbox name for the current backbuffer texture. Needs to be unique per
90 // GL texture and is invalid while service_id is zero. 90 // GL texture and is invalid while service_id is zero.
91 gpu::gles2::MailboxName mailbox_name_; 91 gpu::gles2::MailboxName mailbox_name_;
92 92
93 // The current size of the GLSurface. Used to disambiguate from the current 93 // The current size of the GLSurface. Used to disambiguate from the current
94 // texture size which might be outdated (since we use two buffers). 94 // texture size which might be outdated (since we use two buffers).
95 gfx::Size current_size_; 95 gfx::Size current_size_;
96 float scale_factor_;
96 97
97 // Whether or not the command buffer stub has been destroyed. 98 // Whether or not the command buffer stub has been destroyed.
98 bool stub_destroyed_; 99 bool stub_destroyed_;
99 100
100 bool backbuffer_suggested_allocation_; 101 bool backbuffer_suggested_allocation_;
101 bool frontbuffer_suggested_allocation_; 102 bool frontbuffer_suggested_allocation_;
102 103
103 scoped_ptr<ImageTransportHelper> helper_; 104 scoped_ptr<ImageTransportHelper> helper_;
104 gfx::GLSurfaceHandle handle_; 105 gfx::GLSurfaceHandle handle_;
105 106
(...skipping 13 matching lines...) Expand all
119 // Holds a reference to the mailbox manager for cleanup. 120 // Holds a reference to the mailbox manager for cleanup.
120 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; 121 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
121 122
122 cc::LatencyInfo latency_info_; 123 cc::LatencyInfo latency_info_;
123 DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface); 124 DISALLOW_COPY_AND_ASSIGN(TextureImageTransportSurface);
124 }; 125 };
125 126
126 } // namespace content 127 } // namespace content
127 128
128 #endif // CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_ 129 #endif // CONTENT_COMMON_GPU_TEXTURE_IMAGE_TRANSPORT_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface_win.cc ('k') | content/common/gpu/texture_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698