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

Side by Side Diff: content/browser/compositor/buffer_queue.cc

Issue 846063002: compositor: Fix texture flipping for SW mirroring with surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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 #include "content/browser/compositor/buffer_queue.h" 5 #include "content/browser/compositor/buffer_queue.h"
6 6
7 #include "content/browser/compositor/image_transport_factory.h" 7 #include "content/browser/compositor/image_transport_factory.h"
8 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 8 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
9 #include "content/common/gpu/client/context_provider_command_buffer.h" 9 #include "content/common/gpu/client/context_provider_command_buffer.h"
10 #include "content/common/gpu/client/gl_helper.h" 10 #include "content/common/gpu/client/gl_helper.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 texture, 68 texture,
69 source_texture, 69 source_texture,
70 SkRegion(SkIRect::MakeXYWH(new_damage.x(), 70 SkRegion(SkIRect::MakeXYWH(new_damage.x(),
71 new_damage.y(), 71 new_damage.y(),
72 new_damage.width(), 72 new_damage.width(),
73 new_damage.height())), 73 new_damage.height())),
74 SkRegion(SkIRect::MakeXYWH(old_damage.x(), 74 SkRegion(SkIRect::MakeXYWH(old_damage.x(),
75 old_damage.y(), 75 old_damage.y(),
76 old_damage.width(), 76 old_damage.width(),
77 old_damage.height()))); 77 old_damage.height())));
78 // CopySubBufferDamage binds its own framebuffer, restore ours.
danakj 2015/01/12 18:27:30 Should this be a separate CL?
achaulk 2015/01/12 18:47:35 It could be, but SW mirroring with partial swap is
danakj 2015/01/12 19:00:07 It doesn't seem related to flipping tho? So It wou
79 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
78 } 80 }
79 81
80 void BufferQueue::UpdateBufferDamage(const gfx::Rect& damage) { 82 void BufferQueue::UpdateBufferDamage(const gfx::Rect& damage) {
81 for (size_t i = 0; i < available_surfaces_.size(); i++) 83 for (size_t i = 0; i < available_surfaces_.size(); i++)
82 available_surfaces_[i].damage.Union(damage); 84 available_surfaces_[i].damage.Union(damage);
83 for (std::deque<AllocatedSurface>::iterator it = 85 for (std::deque<AllocatedSurface>::iterator it =
84 in_flight_surfaces_.begin(); 86 in_flight_surfaces_.begin();
85 it != in_flight_surfaces_.end(); 87 it != in_flight_surfaces_.end();
86 ++it) 88 ++it)
87 it->damage.Union(damage); 89 it->damage.Union(damage);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 gl->DeleteTextures(1, &texture); 181 gl->DeleteTextures(1, &texture);
180 return AllocatedSurface(); 182 return AllocatedSurface();
181 } 183 }
182 allocated_count_++; 184 allocated_count_++;
183 gl->BindTexture(GL_TEXTURE_2D, texture); 185 gl->BindTexture(GL_TEXTURE_2D, texture);
184 gl->BindTexImage2DCHROMIUM(GL_TEXTURE_2D, id); 186 gl->BindTexImage2DCHROMIUM(GL_TEXTURE_2D, id);
185 return AllocatedSurface(texture, id, gfx::Rect(size_)); 187 return AllocatedSurface(texture, id, gfx::Rect(size_));
186 } 188 }
187 189
188 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/reflector_impl.h » ('j') | content/browser/compositor/reflector_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698