Index: ui/gfx/compositor/compositor_win.cc |
diff --git a/ui/gfx/compositor/compositor_win.cc b/ui/gfx/compositor/compositor_win.cc |
index 3afb3c4109a7e68508de45b35fb2bc4cee153f53..b807022fd4dfd4ff6b03516eab24b2cf094df576 100644 |
--- a/ui/gfx/compositor/compositor_win.cc |
+++ b/ui/gfx/compositor/compositor_win.cc |
@@ -97,9 +97,6 @@ class CompositorWin : public Compositor { |
void UpdatePerspective(const ui::Transform& transform, |
const gfx::Size& view_size); |
- // Returns the overall size of the compositor. |
- const gfx::Size& GetHostSize(); |
- |
// Returns the index buffer used for drawing a texture. |
ID3D10Buffer* GetTextureIndexBuffer(); |
@@ -305,7 +302,7 @@ void ViewTexture::ConvertBitmapToD3DData( |
void ViewTexture::CreateVertexBuffer(const gfx::Size& size) { |
vertex_buffer_.Release(); |
- const gfx::Size& host_size = compositor_->GetHostSize(); |
+ const gfx::Size& host_size = compositor_->size(); |
float x = static_cast<float>(host_size.width()) / 2.0f; |
float y = static_cast<float>(host_size.height()) / 2.0f; |
float w = static_cast<float>(size.width()); |
@@ -332,15 +329,15 @@ void ViewTexture::CreateVertexBuffer(const gfx::Size& size) { |
CompositorWin::CompositorWin(gfx::AcceleratedWidget widget, |
const gfx::Size& size) |
- : host_(widget), |
- technique_(NULL), |
- last_size_(size) { |
+ : Compositor(size), |
+ host_(widget), |
+ technique_(NULL) { |
} |
void CompositorWin::Init() { |
CreateDevice(); |
LoadEffects(); |
- Resize(last_size_); |
+ Resize(size()); |
InitVertexLayout(); |
CreateVertexBuffer(); |
CreateIndexBuffer(); |
@@ -387,10 +384,6 @@ void CompositorWin::UpdatePerspective(const ui::Transform& transform, |
fx_->GetVariableByName("gWVP")->AsMatrix()->SetMatrix(wvp); |
} |
-const gfx::Size& CompositorWin::GetHostSize() { |
- return last_size_; |
sky
2011/08/24 21:17:08
I don't think you wired up changing the size corre
jonathan.backer
2011/08/25 18:57:18
Done.
|
-} |
- |
ID3D10Buffer* CompositorWin::GetTextureIndexBuffer() { |
return index_buffer_.get(); |
} |